When I invoke the following code,
func GetCurrentDirectory() string {
dir, err := filepath.Abs(filepath.Dir(os.Args[0]))
it returns:
/private/var/folders/cg/mwzlhrjs5y55ny553g6xz9tr0000gn/T
Absolutely, it is a temp path, I excepted the path is my current directory, not temporary directory.
dir, err := filepath.Abs("")
could help me,but I must judge whether in run、debug mode in goland or not