mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 11:24:17 +02:00
satisfy full linter
This commit is contained in:
@@ -40,6 +40,7 @@ func ClusterSettingsList(conf *cfg.Config) error {
|
||||
|
||||
table := printer.NewTable(conf, 2, 0)
|
||||
table.Addheaders("setting", "value")
|
||||
|
||||
entries := [][]any{}
|
||||
|
||||
settingshash := res.Persistent // == map[string]json.RawMessage
|
||||
@@ -77,6 +78,7 @@ func ClusterSettingsSet(conf *cfg.Config, args cli.Args) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to marshall transient value <%v> to valid JSON: %w", value, err)
|
||||
}
|
||||
|
||||
put.AddTransient(setting, message)
|
||||
case conf.Persistent:
|
||||
fallthrough
|
||||
@@ -85,6 +87,7 @@ func ClusterSettingsSet(conf *cfg.Config, args cli.Args) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to marshall persistent value <%v> to valid JSON: %w", value, err)
|
||||
}
|
||||
|
||||
put.AddPersistent(setting, message)
|
||||
}
|
||||
}
|
||||
@@ -106,7 +109,6 @@ func ClusterSettingsSetSingle(conf *cfg.Config, setting, value string) error {
|
||||
_, err = conf.DefaultCluster.ES().Cluster.PutSettings().
|
||||
AddPersistent(setting, message).
|
||||
Do(context.Background())
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to set %s: %w", setting, esErrorString(err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user