version.go 751 B

1234567891011121314151617181920212223242526272829303132
  1. // This work is subject to the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
  2. // license. Its contents can be found at:
  3. // http://creativecommons.org/publicdomain/zero/1.0/
  4. package main
  5. import (
  6. "fmt"
  7. "runtime"
  8. )
  9. const (
  10. AppName = "go-bindata"
  11. AppVersionMajor = 3
  12. AppVersionMinor = 1
  13. )
  14. // revision part of the program version.
  15. // This will be set automatically at build time like so:
  16. //
  17. // go build -ldflags "-X main.AppVersionRev `date -u +%s`"
  18. var AppVersionRev string
  19. func Version() string {
  20. if len(AppVersionRev) == 0 {
  21. AppVersionRev = "0"
  22. }
  23. return fmt.Sprintf("%s %d.%d.%s (Go runtime %s).\nCopyright (c) 2010-2013, Jim Teeuwen.",
  24. AppName, AppVersionMajor, AppVersionMinor, AppVersionRev, runtime.Version())
  25. }