feat: 增加sqlite 支持

This commit is contained in:
rikugun
2020-04-12 11:19:28 +08:00
parent 3ebbd7690f
commit 47a45e2d67
5 changed files with 51 additions and 2 deletions
+14 -1
View File
@@ -1,6 +1,9 @@
package utils
import "os"
import (
"os"
"path/filepath"
)
// @title PathExists
// @description 文件目录是否存在
@@ -45,3 +48,13 @@ func CreateDir(dirs ...string) (err error) {
}
return err
}
// @title cwd
// @description 获取当前工作目录
// @return string
func CWD() string {
path, err := os.Executable()
if err != nil {
return ""
}
return filepath.Dir(path)
}