(config map[string]string, allowedKeys map[string]struct{})
| 79 | } |
| 80 | |
| 81 | func validateConfig(config map[string]string, allowedKeys map[string]struct{}) error { |
| 82 | var errs []error |
| 83 | for k := range config { |
| 84 | if _, ok := allowedKeys[k]; !ok { |
| 85 | errs = append(errs, errors.New("unrecognized config key: "+k)) |
| 86 | } |
| 87 | } |
| 88 | return errors.Join(errs...) |
| 89 | } |
| 90 | |
| 91 | func getDockerEndpoint(contextStore store.Reader, config map[string]string) (docker.Endpoint, error) { |
| 92 | if err := validateConfig(config, allowedDockerConfigKeys); err != nil { |
no outgoing calls
no test coverage detected
searching dependent graphs…