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

Function ExampleNewDecoder

decode_example_test.go:106–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104}
105
106func ExampleNewDecoder() {
107 reader := strings.NewReader(`"gojay"`)
108 dec := gojay.NewDecoder(reader)
109
110 var str string
111 err := dec.DecodeString(&str)
112 if err != nil {
113 log.Fatal(err)
114 }
115
116 fmt.Println(str)
117 // Output:
118 // gojay
119}
120
121func ExampleBorrowDecoder() {
122 reader := strings.NewReader(`"gojay"`)

Callers

nothing calls this directly

Calls 2

DecodeStringMethod · 0.95
NewDecoderFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…