Created
August 22, 2013 11:59
-
-
Save atotto/6306293 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
// You can define a version string using -ldflags and -X options. | |
// $ go run -ldflags "-X main.version 0.1" version.go | |
// | |
package main | |
import ( | |
"fmt" | |
) | |
var version string | |
func main() { | |
fmt.Println(version) | |
// Output: | |
// 0.1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment