1 files changed,
3 insertions(+),
3 deletions(-)
Author:
Oleksandr Smirnov
olexsmir@gmail.com
Committed at:
2025-12-07 16:48:44 +0200
Authored at:
2025-11-30 23:18:09 +0200
Change ID:
uoztvpmkmmnzntkuqnslpoqkqlxyrwsl
Parent:
4585e71
M
cmd/json2go/main.go
··· 24 24 25 25 stat, err := os.Stdin.Stat() 26 26 if err != nil { 27 - fmt.Printf("Failed to get stdin stat: %v\n", err) 27 + fmt.Fprintf(os.Stderr, "Failed to get stdin stat: %v\n", err) 28 28 os.Exit(1) 29 29 } 30 30 ··· 37 37 case isPiped: 38 38 data, rerr := io.ReadAll(os.Stdin) 39 39 if rerr != nil { 40 - fmt.Printf("Failed to read piped input: %v\n", rerr) 40 + fmt.Fprintf(os.Stderr, "Failed to read piped input: %v\n", rerr) 41 41 os.Exit(1) 42 42 } 43 43 input = string(data) ··· 49 49 transformer := json2go.NewTransformer() 50 50 type_, err := transformer.Transform(*typeName, input) 51 51 if err != nil { 52 - fmt.Printf("Failed to transform json to type annotation: %v\n", err) 52 + fmt.Fprintf(os.Stderr, "Failed to transform json to type annotation: %v\n", err) 53 53 os.Exit(1) 54 54 } 55 55