cli

package
v0.0.0-...-2873e01 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context() context.Context

Context is small wrapper that returns sig-term bound context

This can be used as (proper) background context that properly terminates all subroutines.

func EnvCommand

func EnvCommand() *cobra.Command

EnvCommand outputs all loaded env variables

func HandleError

func HandleError(err error)

func LoadEnv

func LoadEnv(pp ...string) error

LoadEnv loads env-variables (KEY=VAL) from provided files and paths (by searching for .env file in the given path)

Please note that loaded values DO NOT OVERRIDE the existing environmental variables

func ProvisionCommand

func ProvisionCommand(cffn func() error) *cobra.Command

func RootCommand

func RootCommand(ppRunEfn func() error) *cobra.Command

RootCommand creates root command with a simple persistent-pre-run callback

Callback is called when not executed with help subcommand

func ServeCommand

func ServeCommand(runEfn func() error) *cobra.Command

func UpgradeCommand

func UpgradeCommand(dbfn func() error) *cobra.Command

func VersionCommand

func VersionCommand() *cobra.Command

Types

This section is empty.

Jump to

Keyboard shortcuts

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