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

Method writeString

encode_builder.go:34–36  ·  view source on GitHub ↗

WriteString appends the contents of s to b's Buffer. It returns the length of s and a nil error.

(s string)

Source from the content-addressed store, hash-verified

32// WriteString appends the contents of s to b's Buffer.
33// It returns the length of s and a nil error.
34func (enc *Encoder) writeString(s string) {
35 enc.buf = append(enc.buf, s...)
36}
37
38func (enc *Encoder) writeStringEscape(s string) {
39 l := len(s)

Callers 15

TestAddTimeKeyFunction · 0.95
TestAddTimeFunction · 0.95
writeStringEscapeMethod · 0.95
encodeBoolMethod · 0.95
BoolMethod · 0.95
BoolOmitEmptyMethod · 0.95
BoolNullEmptyMethod · 0.95
TestAddSQLNullStringKeyFunction · 0.95
TestAddSQLNullStringFunction · 0.95
TestAddSQLNullInt64KeyFunction · 0.95
TestAddSQLNullInt64Function · 0.95
TestAddSQLNullFloat64KeyFunction · 0.95

Calls

no outgoing calls

Tested by 15

TestAddTimeKeyFunction · 0.76
TestAddTimeFunction · 0.76
TestAddSQLNullStringKeyFunction · 0.76
TestAddSQLNullStringFunction · 0.76
TestAddSQLNullInt64KeyFunction · 0.76
TestAddSQLNullInt64Function · 0.76
TestAddSQLNullFloat64KeyFunction · 0.76
TestAddSQLNullFloat64Function · 0.76
TestAddSQLNullBoolKeyFunction · 0.76
TestAddSQLNullBoolFunction · 0.76
TestEncoderIntNullEmptyFunction · 0.64