MCPcopy Index your code
hub / github.com/docker/cli / validateConfig

Function validateConfig

cli/command/context/options.go:81–89  ·  view source on GitHub ↗
(config map[string]string, allowedKeys map[string]struct{})

Source from the content-addressed store, hash-verified

79}
80
81func 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
91func getDockerEndpoint(contextStore store.Reader, config map[string]string) (docker.Endpoint, error) {
92 if err := validateConfig(config, allowedDockerConfigKeys); err != nil {

Callers 1

getDockerEndpointFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…