helper

package
v0.6.0-RC1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const DetachedFlag = "detached"
View Source
const DetachedShortFlag = "d"
View Source
const LinuxManPath = "/usr/share/man/man1/"

Variables

This section is empty.

Functions

func Detached

func Detached()

Detached launch command in background

func QuitToStdErr

func QuitToStdErr(msg interface{})

QuitToStdErr prints an error on stderr and closes

func QuitWithUserError

func QuitWithUserError(err error)

QuitWithUserError ...

func ReadFromTerminalYN

func ReadFromTerminalYN(def string) (selected string, err error)

ReadFromTerminalYN read terminal user input from a Yes No dialog. It returns y and n only with an explicit Yy or Nn input. If no input is submitted it returns default value. If the input is different from the expected one empty string is returned.

Types

type Options

type Options struct {
	CfgFn string
}

Options cmd options

func (*Options) InitConfig

func (o *Options) InitConfig(name string)

InitConfig initializes config

type PasswordReader

type PasswordReader interface {
	Read(string) ([]byte, error)
}
var DefaultPasswordReader PasswordReader = new(stdinPasswordReader)

Jump to

Keyboard shortcuts

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