IsValidProvider is a helper function to determine if a provider value is valid, returning true if the supplied provider is valid and false otherwise.
(provider string)
| 11 | // IsValidProvider is a helper function to determine if a provider value is valid, returning |
| 12 | // true if the supplied provider is valid and false otherwise. |
| 13 | func (app *DdevApp) IsValidProvider(provider string) (bool, error) { |
| 14 | pList, err := app.GetValidProviders() |
| 15 | if err != nil { |
| 16 | return false, err |
| 17 | } |
| 18 | return nodeps.ArrayContainsString(pList, provider), nil |
| 19 | } |
| 20 | |
| 21 | // GetValidProviders is a helper function that returns a list of valid providers. |
| 22 | func (app *DdevApp) GetValidProviders() ([]string, error) { |
nothing calls this directly
no test coverage detected