MCPcopy Index your code
hub / github.com/redspread/spread / withExtensions

Function withExtensions

pkg/input/dir/source.go:246–256  ·  view source on GitHub ↗

withExtensions returns the inputted string with the supported file extensions appended to it

(begin string)

Source from the content-addressed store, hash-verified

244
245// withExtensions returns the inputted string with the supported file extensions appended to it
246func 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.
259func multiGlob(patterns ...string) (results []string, err error) {

Callers 2

rcsMethod · 0.85
podsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected