component-basek8s.io/component-base/cli Index | Files | Directories

package cli

import "k8s.io/component-base/cli"

Index

Functions

func Run

func Run(cmd *cobra.Command) int

Run provides the common boilerplate code around executing a cobra command. For example, it ensures that logging is set up properly. Logging flags get added to the command line if not added already. Flags get normalized so that help texts show them with hyphens. Underscores are accepted as alternative for the command parameters.

Source Files

run.go

Directories

PathSynopsis
cli/flag
cli/globalflag
Version
v0.23.0-rc.1
Published
Dec 4, 2021
Platform
js/wasm
Imports
8 packages
Last checked
1 hour ago

Tools for package owners.