MCPcopy Create free account
hub / github.com/gobwas/httphead / ExampleScanOptions

Function ExampleScanOptions

httphead_test.go:22–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20}
21
22func ExampleScanOptions() {
23 foo := map[string]string{}
24
25 ScanOptions([]byte(`foo;bar=1;baz`), func(index int, key, param, value []byte) Control {
26 foo[string(param)] = string(value)
27 return ControlContinue
28 })
29
30 fmt.Printf("bar:%s baz:%s", foo["bar"], foo["baz"])
31 // Output: bar:1 baz:
32}
33
34func ExampleParseOptions() {
35 options, ok := ParseOptions([]byte(`foo;bar=1,baz`), nil)

Callers

nothing calls this directly

Calls 1

ScanOptionsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…