MCPcopy Index your code
hub / github.com/dunglas/httpsfv / marshalBoolean

Function marshalBoolean

boolean.go:13–23  ·  view source on GitHub ↗

marshalBoolean serializes as defined in https://httpwg.org/specs/rfc9651.html#ser-boolean.

(bd io.StringWriter, b bool)

Source from the content-addressed store, hash-verified

11// marshalBoolean serializes as defined in
12// https://httpwg.org/specs/rfc9651.html#ser-boolean.
13func marshalBoolean(bd io.StringWriter, b bool) error {
14 if b {
15 _, err := bd.WriteString("?1")
16
17 return err
18 }
19
20 _, err := bd.WriteString("?0")
21
22 return err
23}
24
25// parseBoolean parses as defined in
26// https://httpwg.org/specs/rfc9651.html#parse-boolean.

Callers 2

marshalBareItemFunction · 0.85
TestMarshalBooleanFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestMarshalBooleanFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…