os.Getwd返回的是当前路径

 os.Executable返回的是临时文件的绝对路径

package tools

import (

"log"

"os"

"testing"

)

func TestOs(t *testing.T) {

log.Println(os.Getwd())

log.Println(os.Executable())

}

 

 

 

 

参考文章

评论可见,请评论后查看内容,谢谢!!!评论后请刷新页面。