Skip to content

Instantly share code, notes, and snippets.

@AndreKR
Last active July 15, 2017 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndreKR/47ab1740b6fe52a8870e80cf8977644b to your computer and use it in GitHub Desktop.
Save AndreKR/47ab1740b6fe52a8870e80cf8977644b to your computer and use it in GitHub Desktop.
var exeDir = getExeDir()
func getExeDir() string {
if os.Getenv("EXEDIR") != "" {
return os.Getenv("EXEDIR")
} else {
return filepath.Dir(os.Args[0])
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment