cobras

package module
v0.0.0-...-b33e51d Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 7 Imported by: 0

README

cobras

Common helpers and utilities for Cobra-based CLIs

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context() (ctx context.Context, cancel func())

func Execute

func Execute(cmd *cobra.Command)

func Run

func Run(opts Options) func(cmd *cobra.Command, args []string)

Types

type Options

type Options interface {
	Complete(cmd *cobra.Command, args []string) error
	Validate() error
	Run(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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