Documentation
¶
Index ¶
- func Bool(opts ...option) (bool, error)
- func Byte(opts ...option) (byte, error)
- func Float32(opts ...option) (float32, error)
- func Float64(opts ...option) (float64, error)
- func Int(opts ...option) (int, error)
- func Int8(opts ...option) (int8, error)
- func Int16(opts ...option) (int16, error)
- func Int32(opts ...option) (int32, error)
- func Int64(opts ...option) (int64, error)
- func MaxAttempt(count int) option
- func Prompt(inputPrompt string) option
- func Rune(opts ...option) (rune, error)
- func String(opts ...option) (string, error)
- func Uint(opts ...option) (uint, error)
- func Uint8(opts ...option) (uint8, error)
- func Uint16(opts ...option) (uint16, error)
- func Uint32(opts ...option) (uint32, error)
- func Uint64(opts ...option) (uint64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Float32 ¶
Float32 reads a floating-point number from the input source and returns it as a float32.
func Float64 ¶
Float64 reads a floating-point number from the input source and returns it as a float64.
func Int16 ¶ added in v0.9.0
Int16 reads an integer from the input source and returns it as an int16.
func Int32 ¶ added in v0.9.0
Int32 reads an integer from the input source and returns it as an int32.
func Int64 ¶ added in v0.9.0
Int64 reads an integer from the input source and returns it as an int64.
func MaxAttempt ¶
func MaxAttempt(count int) option
MaxAttempt limits the number of input attempts. A value of 0 allows unlimited attempts.
func Prompt ¶
func Prompt(inputPrompt string) option
Prompt sets the text displayed before reading input.
func String ¶
String reads a string from the input source. MaxAttempt does not affect String because every input is valid.
func Uint ¶ added in v1.0.0
Uint reads an unsigned integer from the input source and returns it as a uint.
func Uint8 ¶ added in v1.0.0
Uint8 reads an unsigned integer from the input source and returns it as a uint8.
func Uint16 ¶ added in v1.0.0
Uint16 reads an unsigned integer from the input source and returns it as a uint16.
Types ¶
This section is empty.