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

Function Marshal

encode.go:35–42  ·  view source on GitHub ↗

Marshal returns the HTTP Structured Value serialization of v as defined in https://httpwg.org/specs/rfc9651.html#text-serialize. v must be a List, a Dictionary, an Item or an InnerList.

(v StructuredFieldValue)

Source from the content-addressed store, hash-verified

33//
34// v must be a List, a Dictionary, an Item or an InnerList.
35func Marshal(v StructuredFieldValue) (string, error) {
36 var b strings.Builder
37 if err := v.marshalSFV(&b); err != nil {
38 return "", err
39 }
40
41 return b.String(), nil
42}

Callers 8

TestMarshalFunction · 0.85
TestMarshalErrorFunction · 0.85
TestMarshalListFunction · 0.85
FuzzUnmarshalListFunction · 0.85
TestMarshalItemFunction · 0.85
ExampleMarshalFunction · 0.85

Calls 1

marshalSFVMethod · 0.65

Tested by 8

TestMarshalFunction · 0.68
TestMarshalErrorFunction · 0.68
TestMarshalListFunction · 0.68
FuzzUnmarshalListFunction · 0.68
TestMarshalItemFunction · 0.68
ExampleMarshalFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…