util

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package util provides common utilities for spf13/cobra CLI utilities that can be used for various commands within this project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustBindPFlag

func MustBindPFlag(key string, flag *pflag.Flag)

MustBindPFlag attempts to bind a specific key to a pflag (as used by cobra) and panics if the binding fails with a non-nil error.

func MustMarkFlagRequired

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

MustMarkFlagRequired attempts to mark a cmd flag as required. Panics if the command fails with a non-nil error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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