(new): sneklog v2
Golang lint / lint (push) Successful in 1m39s

This commit is contained in:
2026-04-27 10:23:54 +03:00
parent 3aee299869
commit a34734366d
23 changed files with 245 additions and 185 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ import (
"git.scuroneko.dev/scuroneko/extypes"
"git.scuroneko.dev/scuroneko/laniakea/tgapi"
"git.scuroneko.dev/scuroneko/laniakea/utils"
"git.scuroneko.dev/scuroneko/slog"
"git.scuroneko.dev/scuroneko/sneklog/v2"
)
// CommandValueType defines the expected type of command argument.
@@ -169,7 +169,7 @@ type Plugin[T AppData] struct {
scenes map[string]*Scene[T] // Optional scenes for multi-step interactions
middlewares extypes.Slice[Middleware[T]] // Shared middlewares for all commands/payloads
skipAutoCmd bool // If true, all commands in this plugin are excluded from auto-help
logger *slog.Logger
logger *sneklog.Logger
messageFallback CommandExecutor[T]
handlers map[tgapi.UpdateType]CommandExecutor[T]
@@ -293,7 +293,7 @@ func (p *Plugin[T]) SkipCommandAutoGen() *Plugin[T] {
//
// Call this before Bot.AddPlugins. If the plugin is already registered, changing
// the original *Plugin does not update the Bot's internal copy.
func (p *Plugin[T]) SetLogger(l *slog.Logger) *Plugin[T] {
func (p *Plugin[T]) SetLogger(l *sneklog.Logger) *Plugin[T] {
p.logger = l
return p
}