Last active
July 15, 2017 07:28
-
-
Save AndreKR/47ab1740b6fe52a8870e80cf8977644b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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