version

package
v0.0.0-...-2f32780 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdVersion

func NewCmdVersion(runr *state.Runr) *cobra.Command

NewCmdVersion returns a cobra command for fetching versions

Types

type Info

type Info struct {
	// Version is the semantic version of the build.
	// https://semver.org/
	Version   string `json:"version"`
	GitCommit string `json:"gitCommit"`
	BuildDate string `json:"buildDate"`
}

func (Info) String

func (info Info) String() string

String returns info as a human-friendly version string.

type VersionOptions

type VersionOptions struct {
	*state.Runr
}

VersionOptions is a struct to support version command

func NewVersionOptions

func NewVersionOptions(runr *state.Runr) *VersionOptions

NewOptions returns initialized Options

func (*VersionOptions) Complete

func (o *VersionOptions) Complete(cmd *cobra.Command, args []string) error

Complete completes all the required options

func (*VersionOptions) Run

func (o *VersionOptions) Run() error

Run executes version command

func (*VersionOptions) Validate

func (o *VersionOptions) Validate() error

Validate validates the provided options

Jump to

Keyboard shortcuts

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