Add pathtools.ReplaceExtension
Change-Id: I67d08700fce37b7949e6103132212766cdbe54ec
This commit is contained in:
parent
46f8d184fb
commit
42cad4b7dc
1 changed files with 5 additions and 1 deletions
|
@ -23,7 +23,11 @@ func PrefixPaths(paths []string, prefix string) []string {
|
|||
func ReplaceExtensions(paths []string, extension string) []string {
|
||||
result := make([]string, len(paths))
|
||||
for i, path := range paths {
|
||||
result[i] = replaceRegexp.ReplaceAllString(path, "."+extension)
|
||||
result[i] = ReplaceExtension(path, extension)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
func ReplaceExtension(path string, extension string) string {
|
||||
return replaceRegexp.ReplaceAllString(path, "."+extension)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue