1 files changed,
3 insertions(+),
3 deletions(-)
Author:
Oleksandr Smirnov
olexsmir@gmail.com
Committed at:
2025-12-07 16:48:44 +0200
Change ID:
uoztvpmkmmnzntkuqnslpoqkqlxyrwsl
Parent:
4585e71
M
cmd/json2go/main.go
@@ -24,7 +24,7 @@ args := flag.Args()
stat, err := os.Stdin.Stat() if err != nil { - fmt.Printf("Failed to get stdin stat: %v\n", err) + fmt.Fprintf(os.Stderr, "Failed to get stdin stat: %v\n", err) os.Exit(1) }@@ -37,7 +37,7 @@ input = args[0]
case isPiped: data, rerr := io.ReadAll(os.Stdin) if rerr != nil { - fmt.Printf("Failed to read piped input: %v\n", rerr) + fmt.Fprintf(os.Stderr, "Failed to read piped input: %v\n", rerr) os.Exit(1) } input = string(data)@@ -49,7 +49,7 @@
transformer := json2go.NewTransformer() type_, err := transformer.Transform(*typeName, input) if err != nil { - fmt.Printf("Failed to transform json to type annotation: %v\n", err) + fmt.Fprintf(os.Stderr, "Failed to transform json to type annotation: %v\n", err) os.Exit(1) }