appVersion

package
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

README

启动后输出版本信息 编译时写入版本信息

使用方法: 入口导入 _ "github.com/solaa51/swagger/appVersion"

编译命令举例
    go build -ldflags "-X 'github.com/solaa51/swagger/appVersion.Version=v.1.0.0' -X 'github.com/solaa51/swagger/appVersion.User=$(id -u -n)' -X 'github.com/solaa51/swagger/appVersion.Time=$(date +%Y-%m-%d+%H:%M:%S)' -s -w" -o b b.go

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version string
	User    string
	Time    string
)

用来设置版本信息 可在编译时设置版本等信息

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL