internal

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExist

func FileExist(fn string) (bool, error)

FileExist check if the specified file exists

func GetAbsolutePath

func GetAbsolutePath(fn string) (string, error)

GetAbsolutePath return the absolute path of the specified file.

func GetMultilineText

func GetMultilineText(cols uint) (string, error)

GetMultilineText read multiline text from terminal.

func GetSecretPhrase

func GetSecretPhrase() (string, error)

GetSecretPhrase read a password entry from terminal.

func GetSecretPhraseDoubleCheck

func GetSecretPhraseDoubleCheck() (string, error)

GetSecretPhraseDoubleCheck read a password entry from terminal. This routine ask for the password twice in order to be sure.

func NewFileAlreadyExistError

func NewFileAlreadyExistError(fn string) error

NewFileAlreadyExistError build a file already exist error message

func NewFileNotFoundError

func NewFileNotFoundError(fn string) error

NewFileNotFoundError build a file not found error message

func NewMissingParameterError added in v1.0.2

func NewMissingParameterError(param, cmdName string) error

NewMissingParameterError build a file already exist error message

func TruncateText

func TruncateText(s string, i int) string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL