Load returns the node ID most recently stamped into the holder, or "" if nothing has been stamped. Intended for the response writer wrapper's first-byte hook.
(h *atomic.Value)
| 84 | // "" if nothing has been stamped. Intended for the response writer |
| 85 | // wrapper's first-byte hook. |
| 86 | func Load(h *atomic.Value) string { |
| 87 | if h == nil { |
| 88 | return "" |
| 89 | } |
| 90 | v, _ := h.Load().(string) |
| 91 | return v |
| 92 | } |
| 93 | |
| 94 | // Inherit copies the holder reference from src into dst when present. |
| 95 | // Used at request-handling seams where the request context is replaced |
no test coverage detected