version

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CommunityModulePath = "github.com/anzhiyu-c/anheyu-app"
View Source
const ProModulePath = "github.com/anzhiyu-c/anheyu-pro-backend"

Variables

View Source
var (
	Version   = "dev"             // 版本号,如 v1.0.0
	Commit    = "unknown"         // Git commit hash
	Date      = "unknown"         // 构建时间
	GoVersion = runtime.Version() // Go 版本
)

这些变量将在构建时通过 ldflags 注入

Functions

func GetBuildDate added in v1.1.19

func GetBuildDate() string

GetBuildDate 返回构建时间

func GetCommit added in v1.1.19

func GetCommit() string

GetCommit 返回 Git commit hash

func GetVersion

func GetVersion() string

GetVersion 返回应用版本号

func GetVersionString added in v1.1.19

func GetVersionString() string

GetVersionString 返回完整的版本字符串

Types

type BuildInfo added in v1.1.19

type BuildInfo struct {
	Version   string `json:"version"`
	Commit    string `json:"commit"`
	Date      string `json:"date"`
	GoVersion string `json:"go_version"`
}

BuildInfo 包含构建信息

func GetBuildInfo added in v1.1.19

func GetBuildInfo() BuildInfo

GetBuildInfo 返回详细的构建信息

Jump to

Keyboard shortcuts

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