init repo
This commit is contained in:
11
utils/file.go
Normal file
11
utils/file.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func ReplaceExtension(filepathStr, newExt string) string {
|
||||
ext := filepath.Ext(filepathStr)
|
||||
return strings.TrimSuffix(filepathStr, ext) + newExt
|
||||
}
|
||||
Reference in New Issue
Block a user