(new): logger replacer for token
Golang lint / lint (push) Successful in 1m19s

(fix): scene command routing
This commit is contained in:
2026-04-23 21:50:00 +03:00
parent d6da95394c
commit 768dc859d7
10 changed files with 110 additions and 34 deletions
+9
View File
@@ -104,12 +104,21 @@ func (codec BotOptsFileJsonCodec) ToBytes(opts *BotOpts) ([]byte, error) {
return data, nil
}
func (codec BotOptsFileJsonCodec) Load(filename string) (*BotOpts, error) {
return LoadBotOptsFile(codec, filename)
}
func (codec BotOptsFileJsonCodec) Save(filename string, opts *BotOpts) error {
return SaveBotOptsFile(codec, filename, opts)
}
var envParameterRegex = regexp.MustCompile(`\{\{\s*(\w+)\s*\}\}`)
// BotOptsFileCodec decodes and encodes BotOpts file formats.
type BotOptsFileCodec interface {
FromBytes([]byte) (*BotOpts, error)
ToBytes(*BotOpts) ([]byte, error)
Load(filename string) (*BotOpts, error)
Save(filename string, opts *BotOpts) error
}
// LoadBotOptsFile reads a config file, expands env placeholders, and decodes BotOpts.