Usage

  • gf -v
  • gf version

Used to check the version information compiled at the current gf command line tool.

Usage Example

>= v2.5.7

  1. $ gf version
  2. v2.7.2
  3. Welcome to GoFrame!
  4. Env Detail:
  5. Go Version: go1.22.2 linux/amd64
  6. GF Version(go.mod):
  7. github.com/gogf/gf/contrib/drivers/mysql/v2@v2.7.2
  8. github.com/gogf/gf/v2@v2.7.2
  9. CLI Detail:
  10. Installed At: /data/home/v_hlaghuang/go/bin/gf
  11. Built Go Version: go1.20.8
  12. Built GF Version: v2.7.2
  13. Git Commit: 2024-06-26 10:08:04 b11caba5b03ed54fbb1415151f7d62b6d913179d
  14. Built Time: 2024-06-26 10:09:50
  15. Others Detail:
  16. Docs: https://goframe.org
  17. Now : 2024-07-17T15:48:57+08:00

< v2.5.6

  1. $ gf version
  2. GoFrame CLI Tool v2.0.0, https://goframe.org
  3. GoFrame Version: v2.0.0-beta.0.20211214160159-19c9f0a48845 in current go.mod
  4. CLI Installed At: /Users/john/Workspace/Go/GOPATH/src/github.com/gogf/gf-cli/main
  5. CLI Built Detail:
  6. Go Version: go1.16.3
  7. GF Version: v2.0.0-beta
  8. Git Commit: 2021-12-15 22:43:12 7884058b5df346d34ebab035224e415afb556c19
  9. Build Time: 2021-12-15 23:00:43

Notes

The version information printed automatically detects the GoFrame version used by the current project (automatically parses go.mod) and prints it as GoFrame Version.

The CLI Built Detail information displays various Golang version and GoFrame version information used at the time of the current binary compilation, the Git commit version at the time of compilation, and the compilation time of the current binary file.

Version Check - 图1warning

Please do not confuse the GoFrame Version with the GF Version in the CLI Built Detail.