MCPcopy Index your code
hub / github.com/subtrace/subtrace / WithTag

Function WithTag

rpc/rpc.go:39–47  ·  view source on GitHub ↗
(key string, val string)

Source from the content-addressed store, hash-verified

37}
38
39func WithTag(key string, val string) Option {
40 return func(r *http.Request) {
41 full := fmt.Sprintf("%s=%q", key, val)
42 if prev := r.Header.Get("x-subtrace-tags"); prev != "" {
43 full = prev + " " + full
44 }
45 r.Header.Set("x-subtrace-tags", full)
46 }
47}
48
49var defaultOptions = []Option{
50 WithToken(),

Callers 3

initTunnelFunction · 0.92
newTunnelConnMethod · 0.92
CallFunction · 0.85

Calls 2

GetMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected