version

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 3 Imported by: 1 module, 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 version implements the `mkit version` subcommand.

Index

Constants

This section is empty.

Variables

View Source
var VersionCmd = &cobra.Command{
	Use:   "version",
	Short: "Print the mkit version",
	Long: `Print the mkit version.

The version is read from the Go module build info of this binary
(runtime/debug.ReadBuildInfo). For binaries built from a working tree it
reports (devel).`,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Fprintf(cmd.OutOrStdout(), "mkit %s\n", ModuleVersion())
	},
}

VersionCmd prints the module version of the mkit binary.

Functions

func AddCommands

func AddCommands(rootCmd *cobra.Command)

func ModuleVersion

func ModuleVersion() string

ModuleVersion returns the module version from build info, falling back to "(devel)" when unavailable (e.g. `go run` or `go build` from a non-module-tagged working tree).

Types

This section is empty.

Jump to

Keyboard shortcuts

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