func getCurrentPath() string { _, filename, _, ok := runtime.Caller(1) var cwdPath string if ok { cwdPath = path.Join(path.Dir(filename), "") // the the main function file directory } else { cwdPath = "./" } return cwdPath }
有追求,才有动力!
向每一个软件工程师致敬!
by wujf
mail:921252375@qq.com