cmd

package
v2.25.4 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: MIT Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(prefix string, module fx.Option)

Run loads config and then executes the given runner

Types

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner represents a command runner

func NewRunner

func NewRunner(prefix string) *Runner

NewRunner creates a new Runner

func (*Runner) Getenv

func (r *Runner) Getenv(key string) string

Getenv returns the value of the environment variable named `key`

func (*Runner) Setup

func (r *Runner) Setup(cmd *cobra.Command, options ...fx.Option) *Runner

Setup sets up the Command

func (*Runner) SetupLogging

func (r *Runner) SetupLogging(e env.Environment, loglevel string)

SetupLogging sets up logging for the environment and the default log level

func (*Runner) SetupRoot

func (r *Runner) SetupRoot(cmd *cobra.Command) *Runner

SetupRoot sets up the root Command

Jump to

Keyboard shortcuts

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