mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 11:33:48 +08:00
goimport
This commit is contained in:
parent
7818603f39
commit
373127b799
@ -12,7 +12,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/hjson/hjson-go"
|
||||
"github.com/json-iterator/go"
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@ -321,6 +321,7 @@ func (c *JSONConfig) Save(path string) error {
|
||||
}
|
||||
return WriteAllText(path, string(data))
|
||||
}
|
||||
|
||||
// getCurrentPath 获取当前文件的路径,直接返回string
|
||||
func getCurrentPath() string {
|
||||
cwd, e := GetCurrentPath()
|
||||
@ -347,7 +348,7 @@ func GetCurrentPath() (string, error) {
|
||||
//fmt.Println("path222:", path)
|
||||
i := strings.LastIndex(fpath, "/")
|
||||
if i < 0 {
|
||||
return "", errors.New("system/path_error,Can't find '/' or '\\'");
|
||||
return "", errors.New("system/path_error,Can't find '/' or '\\'")
|
||||
}
|
||||
//fmt.Println("path333:", path)
|
||||
return string(fpath[0 : i+1]), nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user