endsWith returns true if the given string ends with any of the suffixes.
(s string, suffixs ...string)
| 75 | |
| 76 | // endsWith returns true if the given string ends with any of the suffixes. |
| 77 | func endsWith(s string, suffixs ...string) bool { |
| 78 | for _, suffix := range suffixs { |
| 79 | if strings.HasSuffix(s, suffix) { |
| 80 | return true |
| 81 | } |
| 82 | } |
| 83 | return false |
| 84 | } |
| 85 | |
| 86 | // existsDir returns true if the given path is a directory. |
| 87 | func existsDir(filepath string) bool { |
no outgoing calls
no test coverage detected