[Golang] Go 환경변수 쓰기/ 읽기
# 환경변수 쓰기 os.Setenv # 환경변수 읽기 os.Getenv package main import ( "fmt" "os" } func main() { goRoot := os.Getenv("GOROOT") fmt.Println(goRoot) // 시스템 환경변수의 GOROOT 값 출력 os.Setenv("TestEnv", "ABC") fmt.Println(os.Getenv("TestEnv")) } // 결과 // ABC