common

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChDir

func ChDir(cmd *cobra.Command)

ChDir changes the current working directory to the value of the "working-dir" flag of the parent command, if set. Logs an error and exits if the directory change fails.

func GetBoolFlag

func GetBoolFlag(cmd *cobra.Command, name string) bool

GetBoolFlag retrieves a boolean flag value from a cobra command. Logs an error and exits if the flag cannot be retrieved.

func GetStringFlag

func GetStringFlag(cmd *cobra.Command, name string) string

GetStringFlag retrieves a string flag value from a cobra command. Logs an error and exits if the flag cannot be retrieved.

Types

This section is empty.

Jump to

Keyboard shortcuts

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