version

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: Apache-2.0 Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package version 提供全仓库唯一的版本号来源。

构建期由 Makefile 的 VERSION 注入到 Version:

-ldflags "-X github.com/zc310/ofd/internal/version.Version=$(VERSION)"

注入对所有包级字符串变量生效,不必为每个二进制单独指定符号路径。命令行程序的 --version、查看器的关于对话框、Android APK 版本名,以及写进报告和转换产物的 工具版本,全部读同一个值。

Version 是裸版本号,不带 v 前缀:前缀属于展示层(查看器的关于对话框), 报告和 OFD 元数据里的版本字段沿用无前缀形式。

Index

Constants

This section is empty.

Variables

View Source
var Version = "0.1.4"

Version 是发行版本号。

未经 Makefile 构建时(go run、go test、IDE 内运行)使用这个兜底值,因此它必须 与 Makefile 的 VERSION 保持一致——TestVersionMatchesMakefile 会守住这一点。

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