cmd

package
v17.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: MIT Imports: 8 Imported by: 0

README

Commands

Commands in this repository follow the OpenShift guidelines with the following differences:

  • xxxOptions structs are private. No need to export them.
  • xxxOptions structs are called just options to avoid repeating the package name.
  • Methods and fields on options are not exported.
  • Options struct constructor is newOptions - unexported and does not repeat the package name.
  • Error handling and logging/printing is done using cmd.LogAndExitOnError() in cobra.Command#Run(). Do not return the error since it will be logged using the default logger in that case, not the configured logger.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "v0.0.0"
	GitRef  = "0000000000000000000000000000000000000000"
)

Functions

func LogAndExitOnError added in v17.8.0

func LogAndExitOnError(log *slog.Logger, err error)

func Run

func Run(command *cobra.Command)

Types

This section is empty.

Directories

Path Synopsis
kas

Jump to

Keyboard shortcuts

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