Documentation ¶
Index ¶
- func FileExist(fn string) (bool, error)
- func GetAbsolutePath(fn string) (string, error)
- func GetMultilineText(cols uint) (string, error)
- func GetSecretPhrase() (string, error)
- func GetSecretPhraseDoubleCheck() (string, error)
- func NewFileAlreadyExistError(fn string) error
- func NewFileNotFoundError(fn string) error
- func NewMissingParameterError(param, cmdName string) error
- func TruncateText(s string, i int) string
- type AuthenticationError
- type FileAlreadyExistError
- type FileNotFoundError
- type MissingParameterError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAbsolutePath ¶
GetAbsolutePath return the absolute path of the specified file.
func GetMultilineText ¶
GetMultilineText read multiline text from terminal.
func GetSecretPhrase ¶
GetSecretPhrase read a password entry from terminal.
func GetSecretPhraseDoubleCheck ¶
GetSecretPhraseDoubleCheck read a password entry from terminal. This routine ask for the password twice in order to be sure.
func NewFileAlreadyExistError ¶
NewFileAlreadyExistError build a file already exist error message
func NewFileNotFoundError ¶
NewFileNotFoundError build a file not found error message
func NewMissingParameterError ¶ added in v1.0.2
NewMissingParameterError build a file already exist error message
func TruncateText ¶
TruncateText truncate the specified string at defined number of chars
Types ¶
type AuthenticationError ¶
type AuthenticationError struct {
// contains filtered or unexported fields
}
AuthenticationError return an authentication failure message
func (AuthenticationError) Error ¶
func (e AuthenticationError) Error() string
type FileAlreadyExistError ¶
type FileAlreadyExistError struct {
// contains filtered or unexported fields
}
FileAlreadyExistError return a file already exist error message
func (FileAlreadyExistError) Error ¶
func (e FileAlreadyExistError) Error() string
type FileNotFoundError ¶
type FileNotFoundError struct {
// contains filtered or unexported fields
}
FileNotFoundError return a file not found error message
func (FileNotFoundError) Error ¶
func (e FileNotFoundError) Error() string
type MissingParameterError ¶ added in v1.0.2
type MissingParameterError struct {
// contains filtered or unexported fields
}
MissingParameterError return a missed option or argument error message
func (MissingParameterError) Error ¶ added in v1.0.2
func (e MissingParameterError) Error() string