build

package
v0.41.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const VersionHeader = "X-Knot-Version"

VersionHeader carries the server's version on every reply, so the knot command can check it talks to a server it matches.

Variables

View Source
var (
	// Current version of knot
	Version string = "0.41.0"

	// The date the binary was built
	Date string
)

Functions

func FullVersion added in v0.28.0

func FullVersion() string

FullVersion returns the knot version annotated with the embedded scriptling runtime version, e.g. "0.27.0 (scriptling v0.14.0)".

func IsCompatible added in v0.33.0

func IsCompatible(other string) bool

IsCompatible reports whether other can talk to a build of this version. The major and minor parts must match; the patch part and any pre-release suffix are ignored. An empty or malformed version is never compatible — callers use that to reject peers too old to report a version at all.

func MajorMinor added in v0.41.0

func MajorMinor(version string) string

MajorMinor returns the "major.minor" part of a version such as "0.41.2", or "" when it has none.

func SameMajorMinor added in v0.41.0

func SameMajorMinor(a, b string) bool

SameMajorMinor reports whether two versions share major and minor version: the knot command, agents and servers work together only then, as their wire formats change between minor versions.

func ScriptlingVersion added in v0.28.0

func ScriptlingVersion() string

ScriptlingVersion returns the version of the embedded scriptling module, read from the binary's build metadata, normalized to dotted numeric form (no leading "v") so version constraints can compare it directly. Returns "unknown" if it can't be determined, or "local" when a replace directive points at a working copy.

Types

This section is empty.

Jump to

Keyboard shortcuts

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