golang: compact JSON
Criando o client do VPNAPI em golang…
func compactJSON(in []byte) []byte {
buf := new(bytes.Buffer)
err := json.Compact(buf, in)
if err != nil {
return nil
}
return buf.Bytes()
}
Criando o client do VPNAPI em golang…
func compactJSON(in []byte) []byte {
buf := new(bytes.Buffer)
err := json.Compact(buf, in)
if err != nil {
return nil
}
return buf.Bytes()
}
/comments ~umgeher/changelog@lists.sr.ht?Subject=Re: golang: compact JSON
/permalink https://umgeher.org/posts/2022/03/golang-compact-json.html