MCPcopy
hub / github.com/davecheney/httpstat / headerKeyValue

Function headerKeyValue

main.go:198–204  ·  view source on GitHub ↗
(h string)

Source from the content-addressed store, hash-verified

196}
197
198func headerKeyValue(h string) (string, string) {
199 i := strings.Index(h, ":")
200 if i == -1 {
201 log.Fatalf("Header '%s' has invalid format, missing ':'", h)
202 }
203 return strings.TrimRight(h[:i], " "), strings.TrimLeft(h[i:], " :")
204}
205
206func dialContext(network string) func(ctx context.Context, network, addr string) (net.Conn, error) {
207 return func(ctx context.Context, _, addr string) (net.Conn, error) {

Callers 1

newRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected