os.Getwd返回的是当前路径
os.Executable返回的是临时文件的绝对路径
package tools
import (
"log"
"os"
"testing"
)
func TestOs(t *testing.T) {
log.Println(os.Getwd())
log.Println(os.Executable())
}
参考文章
评论可见,请评论后查看内容,谢谢!!!评论后请刷新页面。
os.Getwd返回的是当前路径
os.Executable返回的是临时文件的绝对路径
package tools
import (
"log"
"os"
"testing"
)
func TestOs(t *testing.T) {
log.Println(os.Getwd())
log.Println(os.Executable())
}
参考文章
本文由 用户 于 2024-01-17 发布在 夸智网,如有疑问,请联系我们。
本文链接:https://www.kuazhi.com/post/712899412.html
发表评论