Created
February 20, 2017 19:19
-
-
Save austindoeswork/97a71f1bce8d3a748b2f55cb61666885 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
package main | |
import ( | |
"flag" | |
) | |
var ( | |
commithash string | |
versionFlag = flag.Bool("v", false, "git commit hash") | |
) | |
func main() { | |
flag.Parse() | |
if *versionFlag { | |
fmt.Println(commithash) | |
return | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment