MCPcopy Index your code
hub / github.com/tinylib/msgp / Write

Method Write

_generated/errorwrap_test.go:69–74  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

67type strCounter int
68
69func (o *strCounter) Write(b []byte) (n int, err error) {
70 if msgp.NextType(b) == msgp.StrType {
71 *o++
72 }
73 return len(b), nil
74}
75
76func countStrings(bts []byte) int {
77 r := msgp.NewReader(bytes.NewReader(bts))

Callers 1

WriteMethod · 0.45

Calls 1

NextTypeFunction · 0.92

Tested by

no test coverage detected