Go the slog way

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
pull/30708/head
Benoit Tigeot 6 months ago
parent 6ce967391d
commit 3e4e78378e
No known key found for this signature in database
GPG Key ID: 8E6D4FC8AEBDA62C

@ -17,8 +17,8 @@ limitations under the License.
package main // import "helm.sh/helm/v4/cmd/helm" package main // import "helm.sh/helm/v4/cmd/helm"
import ( import (
"fmt"
"log" "log"
"log/slog"
"os" "os"
// Import to initialize client auth plugins. // Import to initialize client auth plugins.
@ -41,7 +41,7 @@ func main() {
cmd, err := helmcmd.NewRootCmd(os.Stdout, os.Args[1:]) cmd, err := helmcmd.NewRootCmd(os.Stdout, os.Args[1:])
if err != nil { if err != nil {
helmcmd.Logger.Warn(fmt.Sprintf("%+v", err)) helmcmd.Logger.Warn("command failed", slog.Any("error", err))
os.Exit(1) os.Exit(1)
} }

Loading…
Cancel
Save