(provider types.ServiceProviderConfig)
| 311 | } |
| 312 | |
| 313 | func (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. |
| 325 | func firstLine(s string) string { |