MCPcopy Create free account
hub / github.com/francoispqt/gojay / ExampleNewEncoder

Function ExampleNewEncoder

encode_example_test.go:29–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27}
28
29func ExampleNewEncoder() {
30 enc := gojay.BorrowEncoder(os.Stdout)
31
32 var str = "gojay"
33 err := enc.EncodeString(str)
34 if err != nil {
35 log.Fatal(err)
36 }
37 // Output:
38 // "gojay"
39}
40
41func ExampleBorrowEncoder() {
42 enc := gojay.BorrowEncoder(os.Stdout)

Callers

nothing calls this directly

Calls 2

BorrowEncoderFunction · 0.92
EncodeStringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…