Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Feb 14, 2025
2 parents c93cfe9 + acefca4 commit 7dd4322
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions cmd/config.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package cmd

import (
"encoding/json"
"fmt"
"slices"
"strings"

"github.com/evcc-io/evcc/util/config"
Expand Down Expand Up @@ -56,20 +54,7 @@ func runConfig(cmd *cobra.Command, args []string) {
}

for _, c := range configurable {

var j map[string]any
if err := json.Unmarshal([]byte(c.Value), &j); err != nil {
panic(err)
}

for k := range j {
if slices.Contains(redactSecrets, k) {
j[k] = "*****"
}
}

jstr, _ := json.Marshal(j)
fmt.Println(config.NameForID(c.ID), "type:"+c.Type, string(jstr))
fmt.Println(config.NameForID(c.ID), "type:"+c.Type, redactJson(c.Value))
}

fmt.Println("")
Expand Down

0 comments on commit 7dd4322

Please sign in to comment.