cmd

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRootCommand

func CreateRootCommand(_ context.Context, out io.Writer, version string) *cobra.Command

CreateRootCommand is where all the stuff begins

func InitConfigErrCheck

func InitConfigErrCheck(rootCmd *cobra.Command, cfgErr error)

InitConfigErrCheck check if config load failed with error, if so, print error and exit Doing it in PreRun allows us run root cmd as usual, parse help flags and only if no command were run and config load has failed - we print error

Types

This section is empty.

Jump to

Keyboard shortcuts

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