Help us shape the future of Go! Take the 2026 Go Developer Survey

version

package
v1.0.28 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package version holds the program release (injected from VERSION, currently 1.0.28 when built) distinct from protocol 1.0 (0x0100). Handshake carries both.

Index

Constants

View Source
const (
	Client = "loft"
	Node   = "loft-node"
)

Program names on Hello/Status. Not git, OS, or Go.

Variables

View Source
var Version = "dev"

Version is the program release (node and clients). Injected at build:

-X github.com/a3app/loft/internal/version.Version=$(cat VERSION)

Distinct from the protocol version. Handshake sends program name + this semver; not git, OS, or Go.

Functions

func ExitIfAsked

func ExitIfAsked(name string, args []string)

ExitIfAsked prints version and exits 0 when args asked for it.

func Line

func Line(name string) string

Line is "name VERSION (LOFT/1.0)".

func Print

func Print(name string)

Print writes Line(name) to stdout.

func Protocol

func Protocol() string

Protocol is the wire version string ("1.0").

func StampHello

func StampHello(h *wire.Hello)

StampHello fills program name, software semver, and default proto/caps.

func StampNode

func StampNode(s *wire.Status)

StampNode fills node program name, software semver, and default proto/caps.

func Wanted

func Wanted(args []string) bool

Wanted reports whether args asked for the version and nothing else.

Types

This section is empty.

Jump to

Keyboard shortcuts

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