withExtensions returns the inputted string with the supported file extensions appended to it
(begin string)
| 244 | |
| 245 | // withExtensions returns the inputted string with the supported file extensions appended to it |
| 246 | func withExtensions(begin string) []string { |
| 247 | if len(ObjectExtensions) == 0 { |
| 248 | return []string{begin} |
| 249 | } |
| 250 | var paths []string |
| 251 | for _, ext := range ObjectExtensions { |
| 252 | path := fmt.Sprintf("%s.%s", begin, ext) |
| 253 | paths = append(paths, path) |
| 254 | } |
| 255 | return paths |
| 256 | } |
| 257 | |
| 258 | // multiGlob returns the result of multiple Globs into a single slice. |
| 259 | func multiGlob(patterns ...string) (results []string, err error) { |