fix(server): explicit discard of fmt.Fprintln return values for errcheck

This commit is contained in:
2026-04-28 23:12:43 +08:00
parent acf8596f23
commit cb865beabf
+3 -3
View File
@@ -18,7 +18,7 @@ import (
func main() { func main() {
cfg, err := config.Load(os.Getenv("APP_CONFIG_FILE")) cfg, err := config.Load(os.Getenv("APP_CONFIG_FILE"))
if err != nil { if err != nil {
fmt.Fprintln(os.Stderr, "config:", err) _, _ = fmt.Fprintln(os.Stderr, "config:", err)
os.Exit(1) os.Exit(1)
} }
@@ -27,12 +27,12 @@ func main() {
a, err := app.New(rootCtx, cfg) a, err := app.New(rootCtx, cfg)
if err != nil { if err != nil {
fmt.Fprintln(os.Stderr, "app new:", err) _, _ = fmt.Fprintln(os.Stderr, "app new:", err)
os.Exit(1) os.Exit(1)
} }
if err := a.Run(rootCtx); err != nil { if err := a.Run(rootCtx); err != nil {
fmt.Fprintln(os.Stderr, "run:", err) _, _ = fmt.Fprintln(os.Stderr, "run:", err)
os.Exit(1) os.Exit(1)
} }
} }