(envName string, field string)
| 247 | } |
| 248 | |
| 249 | func envValueRequired(envName string, field string) (string, error) { |
| 250 | envName = strings.TrimSpace(envName) |
| 251 | if envName == "" { |
| 252 | return "", fmt.Errorf("plugin store auth missing %s", field) |
| 253 | } |
| 254 | value := strings.TrimSpace(os.Getenv(envName)) |
| 255 | if value == "" { |
| 256 | return "", fmt.Errorf("plugin store auth env %s is empty", envName) |
| 257 | } |
| 258 | return value, nil |
| 259 | } |
no outgoing calls
no test coverage detected