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

Function ExampleMarshal

example_test.go:26–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26func ExampleMarshal() {
27 p := List{NewItem("/member/*/author"), NewItem("/member/*/comments")}
28
29 v, err := Marshal(p)
30 if err != nil {
31 log.Fatalln("error: ", err)
32 }
33
34 h := http.Header{}
35 h.Set("Preload", v)
36
37 b := new(bytes.Buffer)
38 _ = h.Write(b)
39
40 fmt.Println(b.String())
41 // Output: Preload: "/member/*/author", "/member/*/comments"
42}

Callers

nothing calls this directly

Calls 2

NewItemFunction · 0.85
MarshalFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…