releasecontract

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: MIT Imports: 1 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 releasecontract 只拥有 release 与 native evidence 共用的发布 identity: Version/Channel、六个 archive 目标、确定性的 Go↔Rust target 映射与 archive name。 runner、Rust toolchain 与 CC 等可变平台 metadata 只由 ci/platforms.json 持有。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchiveName

func ArchiveName(version string, target Target) string

ArchiveName 返回 release archive 的固定文件名;darwin/linux 为 .tar.gz,Windows 为 .zip。

func Channel

func Channel(version string) string

Channel 返回 release 的稳定渠道名称。调用方必须先 ValidateVersion;build metadata 内合法的连字符不会被视为 prerelease 分隔符。

func ValidateVersion

func ValidateVersion(version string) error

ValidateVersion 要求 version 是不带前导 v 的 semantic version。

Types

type Target

type Target struct {
	GOOS   string
	GOARCH string
}

Target 是固定的 release 目标(GOOS/GOARCH 对)。

func FixedTargets

func FixedTargets() []Target

FixedTargets 返回六个固定发布平台。

func (Target) RustTarget

func (t Target) RustTarget() string

RustTarget 返回 target 对应的 Rust target triple。

func (Target) String

func (t Target) String() string

String 返回稳定 identity,例如 "linux/amd64"。

Jump to

Keyboard shortcuts

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