cli

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: AGPL-3.0 Imports: 112 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Caret = cliui.Styles.Prompt.String()
)

Functions

func AGPL added in v0.8.7

func AGPL() []*cobra.Command

func Core added in v0.8.7

func Core() []*cobra.Command

func CreateClient added in v0.8.7

func CreateClient(cmd *cobra.Command) (*codersdk.Client, error)

CreateClient returns a new client from the command context. It reads from global configuration files if flags are not set.

func CurrentOrganization added in v0.12.0

func CurrentOrganization(cmd *cobra.Command, client *codersdk.Client) (codersdk.Organization, error)

CurrentOrganization returns the currently active organization for the authenticated user.

func EnsureExperimental added in v0.9.3

func EnsureExperimental(cmd *cobra.Command, name string) error

EnsureExperimental will ensure that the experimental feature flag is set if the given flag is set.

func ExperimentalEnabled added in v0.9.3

func ExperimentalEnabled(cmd *cobra.Command) bool

ExperimentalEnabled returns if the experimental feature flag is enabled.

func FormatCobraError added in v0.6.0

func FormatCobraError(err error, cmd *cobra.Command) string

FormatCobraError colorizes and adds "--help" docs to cobra commands.

func Root

func Root(subcommands []*cobra.Command) *cobra.Command

func Server added in v0.8.7

func Server(vip *viper.Viper, newAPI func(context.Context, *coderd.Options) (*coderd.API, io.Closer, error)) *cobra.Command

nolint:gocyclo

Types

This section is empty.

Directories

Path Synopsis
Package cliflag extends flagset with environment variable defaults.
Package cliflag extends flagset with environment variable defaults.

Jump to

Keyboard shortcuts

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