survey

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BoolOptions = []string{"true", "false"}

Functions

func NewSurveyor

func NewSurveyor() *surveyor

Types

type FakeSurveyor

type FakeSurveyor struct {
	AskInputMessages       map[string]string
	AskSelectMessages      map[string]string
	AskMultiSelectMessages map[string][]string
}

FakeSurveyor implements Surveyor and returns fake objects. This doesn't guarantee thread-safety.

func (*FakeSurveyor) AskInput

func (s *FakeSurveyor) AskInput(message string) (string, error)

func (*FakeSurveyor) AskMultiSelect

func (s *FakeSurveyor) AskMultiSelect(message string, options []string) ([]string, error)

func (*FakeSurveyor) AskSelect

func (s *FakeSurveyor) AskSelect(message string, options []string) (string, error)

type Surveyor

type Surveyor interface {
	AskInput(message string) (string, error)
	AskSelect(message string, options []string) (string, error)
	AskMultiSelect(message string, options []string) ([]string, error)
}

Jump to

Keyboard shortcuts

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