version

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProjectName 是本地版本信息的项目标识。
	ProjectName = "nexus"

	// ReleasePageURL 指向用户手动下载发布包的入口。
	ReleasePageURL = "https://github.com/nexus-research-lab/nexus/releases/latest"
)

Variables

View Source
var (
	// AppVersion 由 release 构建通过 ldflags 注入。
	AppVersion = "dev"
	// GitCommit 由 release 构建通过 ldflags 注入。
	GitCommit = ""
	// BuildDate 由 release 构建通过 ldflags 注入。
	BuildDate = ""
)

Functions

func TargetFor

func TargetFor(goos string, goarch string) string

TargetFor 返回发布包使用的平台标识。

Types

type Info

type Info struct {
	Project    string `json:"project"`
	Version    string `json:"version"`
	GitCommit  string `json:"git_commit,omitempty"`
	BuildDate  string `json:"build_date,omitempty"`
	GoOS       string `json:"goos"`
	GoArch     string `json:"goarch"`
	Target     string `json:"target"`
	ReleaseURL string `json:"release_url"`
}

Info 描述当前二进制的版本与平台信息。

func Current

func Current() Info

Current 返回当前进程的版本信息。

Jump to

Keyboard shortcuts

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