MCPcopy
hub / github.com/docker/compose / CheckRequiredParameters

Method CheckRequiredParameters

pkg/compose/plugins.go:313–322  ·  view source on GitHub ↗
(provider types.ServiceProviderConfig)

Source from the content-addressed store, hash-verified

311}
312
313func (c CommandMetadata) CheckRequiredParameters(provider types.ServiceProviderConfig) error {
314 for _, p := range c.Parameters {
315 if p.Required {
316 if _, ok := provider.Options[p.Name]; !ok {
317 return fmt.Errorf("required parameter %q is missing from provider %q definition", p.Name, provider.Type)
318 }
319 }
320 }
321 return nil
322}
323
324// firstLine returns the first line of s, stripping any trailing newlines.
325func firstLine(s string) string {

Callers 1

setupPluginCommandMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected