Documentation ¶
Index ¶
- type Option
- type Session
- func (s Session) Ask(questions ...cliquiz.Question) error
- func (s Session) AskConfirm(message string) error
- func (s Session) Cleanup()
- func (s Session) EventBus() events.Bus
- func (s Session) PauseSpinner() (mightResume func())
- func (s Session) Print(messages ...interface{}) error
- func (s Session) PrintSaidNo() error
- func (s Session) PrintTable(header []string, entries ...[]string) error
- func (s Session) Printf(format string, a ...interface{}) error
- func (s Session) Println(messages ...interface{}) error
- func (s Session) StartSpinner(text string)
- func (s Session) StopSpinner()
- func (s Session) Wait()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(s *Session)
func WithOutput ¶
WithOutput sets output stream for a session.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session controls command line interaction with users.
func (Session) AskConfirm ¶
AskConfirm asks yes/no question in the terminal.
func (Session) Cleanup ¶
func (s Session) Cleanup()
Cleanup ensure spinner is stopped and printLoop exited correctly.
func (Session) PauseSpinner ¶
func (s Session) PauseSpinner() (mightResume func())
PauseSpinner pauses spinner, returns resume function to start paused spinner again.
func (Session) PrintSaidNo ¶
PrintSaidNo prints message informing negative was given in a confirmation prompt
func (Session) PrintTable ¶
PrintTable prints table data.
func (Session) StartSpinner ¶
StartSpinner starts spinner.
Directories ¶
Path | Synopsis |
---|---|
Package cliquiz is a tool to collect answers from the users on cli.
|
Package cliquiz is a tool to collect answers from the users on cli. |
Click to show internal directories.
Click to hide internal directories.