Golang os包下经常使用的系统相关操做

环境变量相关 1. Getenv函数linux func Getenv(key string) string windows 功能:获取系统key的环境变量,若是没有环境变量就返回空app   示例:函数 func main() {     gopath := os.Getenv("GOPATH")     fmt.Println(gopath) }   2. Setenv函数ui func Se
相关文章
相关标签/搜索