version

package
v0.13.11 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package version holds the build-time version identity stamped into the swarm binary. It is reported by `swarm version` and rides the D-8 client<->daemon hello handshake (internal/protocol) as an ADDITIVE signal alongside the wire skew gate (protocol.Version / daemon.ProtocolVersion): it lets a client notice it is talking to a different-build daemon even when the wire protocol still matches.

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "dev"
	Commit  = ""
	Date    = ""
)

Version, Commit, and Date are overridden at release build time via:

-ldflags "-X github.com/Nathandela/swarm/internal/version.Version=v1.2.3 \
          -X github.com/Nathandela/swarm/internal/version.Commit=<sha> \
          -X github.com/Nathandela/swarm/internal/version.Date=<rfc3339>"

(.goreleaser.yaml wires this via goreleaser's {{.Version}}/{{.Commit}}/{{.Date}} template vars.) An unstamped build — `go build`/`go run`/`go test` with no -ldflags, e.g. local dev — defaults Version to "dev"; Commit and Date stay empty.

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