add dao testing cases

This commit is contained in:
yanghao05
2023-02-04 18:53:17 +08:00
parent 1c2b861ac7
commit 2fb6bba903
21 changed files with 464 additions and 12 deletions

View File

@@ -63,3 +63,12 @@ func FileExist(path string) bool {
}
return !os.IsNotExist(err)
}
func FilePathInfo(file string) (path, name, ext string) {
filename := filepath.Base(file)
path = filepath.Dir(file)
ext = filepath.Ext(filename)
name = strings.TrimSuffix(filename, ext)
return
}