Help us shape the future of Go! Take the 2026 Go Developer Survey

cli

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInputEnds     = errors.New("cli: the input ends before the secret")
	ErrSecretsDiffer = errors.New("cli: the secrets differ")
)

Functions

func Command

func Command(root Root, commands ...*cobra.Command) *cobra.Command

func Main

func Main(root Root, commands ...*cobra.Command)

Types

type Root

type Root struct {
	Use     string
	Short   string
	Modules func() []app.Module
}

type SecretReader

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

func NewSecretReader

func NewSecretReader(in io.Reader, prompt io.Writer) *SecretReader

func (*SecretReader) Read

func (r *SecretReader) Read(prompt string) (string, error)

func (*SecretReader) ReadConfirmed

func (r *SecretReader) ReadConfirmed(prompt, repeatPrompt string) (string, error)

Jump to

Keyboard shortcuts

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