HasPrefixes returns true if the string s has any of the given prefixes.
(src string, prefixes ...string)
| 60 | |
| 61 | // HasPrefixes returns true if the string s has any of the given prefixes. |
| 62 | func HasPrefixes(src string, prefixes ...string) bool { |
| 63 | for _, prefix := range prefixes { |
| 64 | if strings.HasPrefix(src, prefix) { |
| 65 | return true |
| 66 | } |
| 67 | } |
| 68 | return false |
| 69 | } |
| 70 | |
| 71 | // GetPostgresSocketDir returns the postgres socket directory of Bytebase. |
| 72 | func GetPostgresSocketDir() string { |
no outgoing calls