cmd/atomdns/internal/dnsctx/status.go
raw| 1 | package dnsctx |
| 2 | |
| 3 | import ( |
| 4 | "context" |
| 5 | ) |
| 6 | |
| 7 | // Status returns boolean indicating if handler/status is set. If not found false is returned. |
| 8 | func Status(ctx context.Context, handler string) bool { |
| 9 | x := ctx.Value(handler + "/" + KeyStatus) |
| 10 | if x == nil { |
| 11 | return false |
| 12 | } |
| 13 | return x.(bool) |
| 14 | } |