Documentation ¶
Index ¶
- Variables
- func Center(str string) string
- func Indent(str string, indent int) string
- func InjectMockResponseToContext(ctx context.Context, mockValues []string) context.Context
- func Line(char string) string
- func Print(a ...interface{}) (int, error)
- func Printf(format string, a ...interface{}) (int, error)
- func Println(a ...interface{}) (int, error)
- func PrintlnWithoutIndent(a string) (int, error)
- func PromptBoolWithConfig(config *PromptBoolConfig) (bool, error)
- func PromptPasswordWithConfig(config *PromptPasswordConfig) (string, error)
- func PromptStringWithConfig(config *PromptStringConfig) (string, error)
- func Readline(config *ReadlineConfig) (string, error)
- func RemoveIndent(str string) string
- func SetOutputWriter(w io.Writer)
- type EOFError
- type InterruptError
- type PromptBoolConfig
- type PromptPasswordConfig
- type PromptStringConfig
- type ReadlineConfig
- type ReadlineHandler
- type ValidateFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// IsInteractive must be set to print anything with Printer functions (Print, Printf,...).
IsInteractive = isInteractive()
)
Functions ¶
func PrintlnWithoutIndent ¶
func PromptBoolWithConfig ¶
func PromptBoolWithConfig(config *PromptBoolConfig) (bool, error)
func PromptPasswordWithConfig ¶
func PromptPasswordWithConfig(config *PromptPasswordConfig) (string, error)
func PromptStringWithConfig ¶
func PromptStringWithConfig(config *PromptStringConfig) (string, error)
func Readline ¶
func Readline(config *ReadlineConfig) (string, error)
func RemoveIndent ¶
func SetOutputWriter ¶
SetOutputWriter set the output writer that will be used by both Printer functions (Print, Printf,...) and readline prompter. This should be called once from the bootstrap function.
Types ¶
type InterruptError ¶
type InterruptError struct{}
func (*InterruptError) Error ¶
func (e *InterruptError) Error() string
func (*InterruptError) MarshalHuman ¶
func (e *InterruptError) MarshalHuman() string
type PromptBoolConfig ¶
type PromptPasswordConfig ¶
type PromptStringConfig ¶
type ReadlineConfig ¶
type ReadlineHandler ¶
type ReadlineHandler struct {
// contains filtered or unexported fields
}
func (*ReadlineHandler) SetPrompt ¶
func (h *ReadlineHandler) SetPrompt(prompt string)
type ValidateFunc ¶
func ValidateOrganizationID ¶
func ValidateOrganizationID() ValidateFunc
Click to show internal directories.
Click to hide internal directories.