common

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAddressFlag added in v0.32.0

func AddAddressFlag(cmd *cobra.Command, v *string)

AddAddressFlag adds the address flag to the passed cobra command.

func AddComponentPathFlag added in v0.32.0

func AddComponentPathFlag(cmd *cobra.Command, v *string)

AddComponentPathFlag adds the path-to-component flag to the passed cobra command.

func AddOutputFileFlag added in v0.32.0

func AddOutputFileFlag(cmd *cobra.Command, v *string)

AddOutputFileFlag adds the output file flag to the passed cobra command.

func Errf

func Errf(errFmt string, err error) error

Errf returns formatted error in errFmt format if err is not nil.

func ExitOnErr

func ExitOnErr(cmd *cobra.Command, err error)

ExitOnErr calls exitOnErrCode with code 1.

func PrintObjectHeader added in v0.32.0

func PrintObjectHeader(cmd *cobra.Command, h object.Object)

PrintObjectHeader prints passed object's header fields via the passed cobra command. Does nothing with the payload.

func WriteObjectToFile added in v0.32.0

func WriteObjectToFile(cmd *cobra.Command, path string, data []byte)

WriteObjectToFile writes object to the provided path. Does nothing if the path is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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