Documentation
¶
Index ¶
- func CanConvert(data interface{}, optionType types.OptionType) (bool, error)
- func ConvertString(value string, data any, arg string, delimiterFunc types.ListDelimiterFunc) error
- func GetSecureString(prompt string, w io.Writer, terminal TerminalReader) (string, error)
- func InsertSlice[T any](arr []T, pos int, element ...T) []T
- func Min[T Numeric](x, y T) T
- func NewOfType[T any](value T) *T
- func Reverse[T any](s []T)
- func UnwrapType(t reflect.Type) reflect.Type
- func UnwrapValue(v reflect.Value) (reflect.Value, error)
- type DefaultTerminal
- type Numeric
- type TerminalReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanConvert ¶ added in v1.8.9
func CanConvert(data interface{}, optionType types.OptionType) (bool, error)
func ConvertString ¶ added in v1.8.9
func GetSecureString ¶
GetSecureString reads a password from the terminal
func InsertSlice ¶ added in v1.3.3
InsertSlice inserts item(s) T at position pos and returns a slice
func UnwrapType ¶ added in v1.9.3
UnwrapType recursively unwraps pointer.go types and returns the underlying type
Types ¶
type DefaultTerminal ¶ added in v1.8.3
type DefaultTerminal struct{}
DefaultTerminal implements real terminal operations
func (*DefaultTerminal) IsTerminal ¶ added in v1.8.3
func (t *DefaultTerminal) IsTerminal(fd int) bool
IsTerminal checks if we are attached to a real terminal
func (*DefaultTerminal) ReadPassword ¶ added in v1.8.3
func (t *DefaultTerminal) ReadPassword(fd int) ([]byte, error)
ReadPassword reads a password from the terminal
Click to show internal directories.
Click to hide internal directories.