Help us shape the future of Go! Take the 2026 Go Developer Survey

prerun

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PersistentPreRunE

func PersistentPreRunE(p common.Params) func(*cobra.Command, []string) error

PersistentPreRunE returns a function that can be used as a persistent pre-run function for Cobra commands. It initializes the provided parameters using the flags defined in the command.

Parameters:

  • p: A common.Params struct that will be initialized with values from command flags.

Returns:

  • A function that takes a *cobra.Command and a []string, and returns an error. This function initializes the params using flags.InitParams and returns any error encountered.

Types

This section is empty.

Jump to

Keyboard shortcuts

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