Four
os.Getwd() 返回当前目录
例子 :str, _ := os.Getwd() 返回一个字符串, 和一个错误类型
fmt.Printf("%s", str)
运行程序:
go run main.go
打印结果:
/home/faceboook/go/src/testcode <nil>
例子 :str, _ := os.Getwd() 返回一个字符串, 和一个错误类型
fmt.Printf("%s", str)
运行程序:
go run main.go
打印结果:
/home/faceboook/go/src/testcode <nil>
本文标题:Let's Go Four
本文链接:https://www.haomeiwen.com/subject/teqzfqtx.html
网友评论