1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

[opt] currentPath support windows and linux (#139)

Co-authored-by: hesu <hesu@eacomp.com>
This commit is contained in:
flytutu
2023-09-23 13:45:21 +08:00
committed by GitHub
parent f445ecbaf8
commit a9f01d8a69

View File

@@ -18,7 +18,6 @@ import (
"io/fs"
"net/http"
"os"
"path"
"path/filepath"
"runtime"
"strings"
@@ -491,7 +490,7 @@ func CurrentPath() string {
var absPath string
_, filename, _, ok := runtime.Caller(1)
if ok {
absPath = path.Dir(filename)
absPath = filepath.Dir(filename)
}
return absPath