From 322ae436322686c66c00151a77025db7a5da0817 Mon Sep 17 00:00:00 2001 From: JustusBunsi <61625851+justusbunsi@users.noreply.github.com> Date: Thu, 28 Nov 2024 21:38:38 +0100 Subject: [PATCH] Use log package Signed-off-by: justusbunsi <61625851+justusbunsi@users.noreply.github.com> --- contrib/ini-to-shell/ini-to-shell.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/ini-to-shell/ini-to-shell.go b/contrib/ini-to-shell/ini-to-shell.go index c5599ffae0..bbd6749416 100644 --- a/contrib/ini-to-shell/ini-to-shell.go +++ b/contrib/ini-to-shell/ini-to-shell.go @@ -4,6 +4,7 @@ package main import ( + golog "log" "os" "code.gitea.io/gitea/modules/log" @@ -92,7 +93,9 @@ func runIniToShell(c *cli.Context) error { log.Fatal("Section '%s' does not have key '%s'", sName, kName) } - os.Stdout.Write([]byte(section.Key(kName).Value())) + golog.SetOutput(os.Stdout) + golog.SetFlags(golog.Flags() &^ (golog.Ldate | golog.Ltime)) + golog.Println(section.Key(kName).Value()) return nil }