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

version

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdVersion

func NewCmdVersion(ioStreams genericclioptions.IOStreams) *cobra.Command

NewCmdVersion returns a cobra command for fetching versions

Types

type Options

type Options struct {
	// Output is the target output format for the version string. This may be of
	// value "", "json" or "yaml".
	Output string

	// If true, prints the version number.
	Short bool

	genericclioptions.IOStreams
}

Options is a struct to support version command

func NewOptions

func NewOptions(ioStreams genericclioptions.IOStreams) *Options

NewOptions returns initialized Options

func (*Options) Run

func (o *Options) Run() error

Run executes version command

func (*Options) Validate

func (o *Options) 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