Update myfile.go

This commit is contained in:
xxjwxc
2020-05-22 01:55:27 +08:00
parent f1012a049c
commit cb5d484ec0

View File

@@ -3,14 +3,15 @@ package myfile
import (
"fmt"
"path"
"strings"
"time"
"github.com/xxjwxc/public/tools"
)
// GetExp 获取字符串后缀
func GetExp(exp string) string {
return path.Ext(exp) //获取文件后缀
func GetExp(ext string) string {
return strings.TrimLeft(path.Ext(ext), ".")
}
func getFileName(exp string) string {