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 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.
Click to show internal directories.
Click to hide internal directories.