1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
package env import ( "os" ) // This package encapsulates accessing/mutating the ENV of the program. func GetGitDirEnv() string { return os.Getenv("GIT_DIR") } func SetGitDirEnv(value string) { os.Setenv("GIT_DIR", value) } func UnsetGitDirEnv() { _ = os.Unsetenv("GIT_DIR") }