(lower string)
| 123 | } |
| 124 | |
| 125 | func detectProvider(lower string) string { |
| 126 | for _, hint := range providerHints { |
| 127 | if containsAny(lower, hint.patterns...) { |
| 128 | return hint.provider |
| 129 | } |
| 130 | } |
| 131 | return "" |
| 132 | } |
| 133 | |
| 134 | func containsAny(lower string, patterns ...string) bool { |
| 135 | for _, pattern := range patterns { |