标签:path nbsp bsp var turn function 程序 caller UNC
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 }
标签:path nbsp bsp var turn function 程序 caller UNC
原文地址:https://www.cnblogs.com/wujf/p/10695995.html