newContextWithLocalhost sets the localhost flag to `true` in a new context and returns that context.
(ctx context.Context)
| 36 | // newContextWithLocalhost sets the localhost flag to `true` in a new context |
| 37 | // and returns that context. |
| 38 | func newContextWithLocalhost(ctx context.Context) context.Context { |
| 39 | return context.WithValue(ctx, localhostKey, true) |
| 40 | } |
| 41 | |
| 42 | // Localhost returns true if the localhost flag has been set. |
| 43 | func Localhost(ctx context.Context) bool { |