()
| 13 | ) |
| 14 | |
| 15 | func Example() { |
| 16 | enc := GetEncoder(os.Stdout) |
| 17 | defer PutEncoder(enc) |
| 18 | enc.MustEncode([]string{"a", "slice", "of", "strings"}) |
| 19 | fmt.Fprintln(os.Stdout) |
| 20 | enc.MustEncode(nil) |
| 21 | fmt.Fprintln(os.Stdout) |
| 22 | enc.MustEncode(map[string]string{}) |
| 23 | fmt.Fprintln(os.Stdout) |
| 24 | // Output: ["a","slice","of","strings"] |
| 25 | // null |
| 26 | // {} |
| 27 | } |
| 28 | |
| 29 | func BenchmarkDecode(b *testing.B) { |
| 30 | b.ReportAllocs() |
nothing calls this directly
no test coverage detected