Documentation ¶
Overview ¶
Package stdin provides easy stdin util.
Index ¶
- Variables
- type Input
- func (a *Input) Bool() (bool, error)
- func (a *Input) Default(o string) *Input
- func (a *Input) Duration() (time.Duration, error)
- func (a *Input) Float() (float64, error)
- func (a *Input) Format(o string) *Input
- func (a *Input) Int() (int, error)
- func (a *Input) MustBool() bool
- func (a *Input) MustDuration() time.Duration
- func (a *Input) MustFloat() float64
- func (a *Input) MustInt() int
- func (a *Input) MustString() string
- func (a *Input) MustTime() time.Time
- func (a *Input) Prefix(o string) *Input
- func (a *Input) Prompt(o string) *Input
- func (a *Input) String() (string, error)
- func (a *Input) Time() (time.Time, error)
- func (a *Input) Try(o int) *Input
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyInput = errors.New("stdin: empty input") ErrTooManyTry = errors.New("stdin: too many try") )
Errors.
View Source
var Reader = bufio.NewReader(os.Stdin)
Reader is the stdin reader.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.