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

cliversion

package
v1.3.103 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package cliversion cmd/skywire-cli/commands/version/root.go c4-vis-cli

`skywire cli version` reports the local build (version/commit/date) and, unless --local is given, resolves the latest available version and the rolling-release branch tip the SAME way the Go toolchain does when you run `go install github.com/skycoin/skywire/...@latest` from outside the source: via the Go module proxy protocol.

Resolution is authoritative through `go list -m -json <module>@<query>` (which honors GOPROXY + direct fallback, branch refs, tags, case-escaping — exactly Go's own logic) when the `go` toolchain is on PATH. With no `go` binary it falls back to a direct GOPROXY `@latest` HTTP query for the latest release (proxy.golang.org serves released tags but not arbitrary branch refs).

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "version",
	Short: "Show the build version and check the latest available release/commit",
	Long: `Show the local build (version/commit/date) and, unless --local, resolve the
latest available release and the rolling-release branch tip the way the Go
toolchain resolves '@latest' — via the Go module proxy.`,
	DisableFlagsInUseLine: true,
	Run: func(cmd *cobra.Command, _ []string) {
		local := buildinfo.Get()
		out := &report{Local: local}

		if !localOnly {
			ctx, cancel := context.WithTimeout(cmd.Context(), timeout)
			defer cancel()
			out.resolve(ctx, modulePat, branch)
		}

		internal.PrintOutput(cmd.Flags(), out, out.human())
	},
}

RootCmd is `skywire cli version`.

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