common

package
v0.38.6 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAddressFlag

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

AddAddressFlag adds the address flag to the passed cobra command.

func AddComponentPathFlag

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

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

func AddOutputFileFlag

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

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

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

func WriteObjectToFile

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