使用方式

  • gf -v
  • gf version

用以查看当前gf命令行工具编译时的版本信息。


栏目说明
首行工具的版本号
Env Detail

环境信息:

go的版本号

当前项目对于goframe的依赖情况

CLI Detail / CLI Built Detail

工具的详细信息:

安装目录

构建时的go版本

构建时的gf版本

预编译的构建信息更加详细

Others Detail

其他详细信息:

文档地址

当前系统时间


使用示例

>= v2.5.7

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

< v2.5.6

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

注意事项

在打印的版本信息中会自动检测当前项目使用的GoFrame版本(自动解析go.mod),并以GoFrame Version的信息打印出来。

CLI Built Detail信息中展示的是当前二进制编译时使用的各种Golang版本以及GoFrame版本信息,编译时的Git提交版本、当前二进制文件的编译时间。

大家请勿将GoFrame VersionCLI Built Detail中的GF Version混淆。



Content Menu

  • No labels

8 Comments

  1. ❯ gf -v
    GoFrame CLI Tool v1.15.0, https://goframe.org
    Install Path: /usr/local/bin/gf
    Build Detail:
      Go Version:  go1.15.5
      GF Version:  v1.15.1
      Git Commit:  0a6767d79858e5d3fdb03ad31db8a34a84761355
      Build Time:  2021-01-16 20:24:37

  2. gf -v

    GoFrame CLI Tool v1.15.4, https://goframe.org

    Install Path: /usr/local/bin/gf

    Build Detail:

      Go Version:  go1.15.5

      GF Version:  v1.15.3

      Git Commit:  cd7fd68dfd22f43d5b67b432dfd2e6c2fbafb012

      Build Time:  2021-03-17 22:01:09

  3.  gf -v
    GoFrame CLI Tool v1.16.3, https://goframe.org
    GoFrame Version: v1.15.3 in current go.mod
    CLI Installed At: D:\www_go\bin\gf.exe
    CLI Built Detail:
      Go Version:  go1.16.3
      GF Version:  v1.16.0
      Git Commit:  42d9811d5f8c8be349a1591c8b98c916cf8281aa
      Build Time:  2021-06-22 22:02:04

  4.  $ gf -v
       GoFrame CLI Tool v1.16.3, https://goframe.org
       GoFrame Version: cannot find go.mod
       CLI Installed At: /home/wt-zh/go/bin/gf
    CLI Built Detail:

       Go Version:  go1.15.13
       GF Version:  v1.16.0
       Git Commit:  42d9811d5f8c8be349a1591c8b98c916cf8281aa
       Build Time:  2021-06-22 12:59:28

  5. GoFrame CLI Tool v2.0.0-rc3, https://goframe.org 
    GoFrame Version: cannot find go.mod 
    CLI Installed At: /usr/local/go/bin/gf 
    CLI Built Detail:
      Go Version:  go1.17.7
      GF Version:  v2.0.0-rc3
      Git Commit:  2022-02-23 12:03:21 8eb9fdfcd014081a936c23dbf0759f838babc0cd
      Build Time:  2022-02-23 04:03:01 

  6. gf -v
    GoFrame CLI Tool v2.0.5, https://goframe.org
    GoFrame Version: cannot find go.mod
    CLI Installed At: E:\GoPath\bin\gf.exe
    CLI Built Detail:
      Go Version:  go1.17.7
      GF Version:  v2.0.5
      Git Commit:  2022-03-31 16:52:15 87609a34241b6b364c36fe11b0bfe6a680ba0878
      Build Time:  2022-03-31 16:50:21

  7. gf -v
    GoFrame CLI Tool v2.0.6, https://goframe.org
    GoFrame Version: cannot find go.mod
    CLI Installed At: F:\gogo\global_gopath\bin\gf.exe
    CLI Built Detail:
      Go Version:  go1.17.7
      GF Version:  v2.0.6
      Git Commit:  2022-03-31 16:57:32 66803fd6641e31c60f0489180668243ea092b87b
      Build Time:  2022-03-31 16:55:38

  8. PS D:\phpstudy_pro\WWW\go\app01> gf -v
    GoFrame CLI Tool v2.0.0-rc, https://goframe.org
    GoFrame Version: cannot find goframe requirement in go.mod
    CLI Installed At: D:\phpstudy_pro\Extensions\GoPath\bin\gf.exe
    CLI Built Detail:
      Go Version:  go1.17.6
      GF Version:  v2.0.0-beta
      Git Commit:  2022-01-24 11:02:57 37d535f61e975dff1765f98e3b505aeccfec338e
      Build Time:  2022-01-24 03:01:42