You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
365 B

  1. package version
  2. import (
  3. "fmt"
  4. )
  5. const Maj = "0"
  6. const Min = "10"
  7. const Fix = "0"
  8. var (
  9. // The full version string
  10. Version = "0.10.0"
  11. // GitCommit is set with --ldflags "-X main.gitCommit=$(git rev-parse HEAD)"
  12. GitCommit string
  13. )
  14. func init() {
  15. Version = fmt.Sprintf("%d.%d.%d", Maj, Min, Fix)
  16. if GitCommit != "" {
  17. Version += "-" + GitCommit[:8]
  18. }
  19. }