(ctx context.Context, key string)
| 80 | } |
| 81 | |
| 82 | func (s *Chain) Lookup(ctx context.Context, key string) (string, bool, error) { |
| 83 | newVal, err := s.LookupMulti(ctx, key) |
| 84 | if err != nil { |
| 85 | return "", false, err |
| 86 | } |
| 87 | if len(newVal) == 0 { |
| 88 | return "", false, nil |
| 89 | } |
| 90 | |
| 91 | return newVal[0], true, nil |
| 92 | } |
| 93 | |
| 94 | func (s *Chain) LookupMulti(ctx context.Context, key string) ([]string, error) { |
| 95 | result := []string{key} |
nothing calls this directly
no test coverage detected