Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
yanhao-pro committed Nov 15, 2022
1 parent 36f782b commit c14231b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snippets/go.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ snippet jp "json Marshal and print"
// DEBUG: remove before commit
_, file, line, _ := runtime.Caller(0)
jb, _ := json.MarshalIndent(${1}, "", " ")
fmt.Printf("\n[%s:%s - %s]\n%s\n\n", file, line, name, string(jb))
fmt.Printf("\n[%s:%d - %s]\n%s\n\n", file, line, name, string(jb))
_ = ioutil.WriteFile(name + ".json", jb, 0644)
}("${2}")

Expand Down

0 comments on commit c14231b

Please sign in to comment.