Use a better method to reload command presets

This commit is contained in:
NI
2020-03-12 21:18:08 +08:00
parent b2210ce2b6
commit 1009cd4284
12 changed files with 206 additions and 374 deletions

View File

@@ -28,10 +28,7 @@ const (
// Direct creates a loader that return raw configuration data directly.
// Good for integration.
func Direct(cfg Configuration) Loader {
return func(
log log.Logger,
r Reconfigurator,
) (string, Configuration, error) {
return func(log log.Logger) (string, Configuration, error) {
return directTypeName, cfg, nil
}
}