Documentation
¶
Index ¶
- Variables
- func Log(logmessage string)
- func LogBold(logmessage string)
- func LogChanged(logmessage string)
- func LogChangedf(logmessage string, args ...interface{})
- func LogError(logmessage string)
- func LogErrorf(logmessage string, args ...interface{})
- func LogFatal(logmessage string)
- func LogFatalWithTrace(errorMessageOrError interface{})
- func LogFatalWithTracef(logmessage string, args ...interface{})
- func LogFatalf(logmessage string, args ...interface{})
- func LogGoError(err error)
- func LogGoErrorFatal(err error)
- func LogGoErrorFatalWithTrace(err error)
- func LogGood(logmessage string)
- func LogGoodf(logmessage string, args ...interface{})
- func LogInfo(logmessage string)
- func LogInfof(logmessage string, args ...interface{})
- func LogWarn(logmessage string)
- func LogWarnf(logmessage string, args ...interface{})
- func MustFormatAsTestname(objectToFormat interface{}) (testname string)
- func TracedError(errorMessageOrError interface{}) (tracedError error)
- func TracedErrorEmptyString(stringVarName string, errorToUnwrap ...error) (tracedError error)
- func TracedErrorNil(nilVarName string) (tracedError error)
- func TracedErrorNilf(formatString string, args ...interface{}) (tracedError error)
- func TracedErrorNotImplemented() (tracedError error)
- func TracedErrorf(formatString string, args ...interface{}) (tracedError error)
- type Directory
- type ErrorsService
- type File
- type LocalFile
- func (l LocalFile) Exists() (exists bool, err error)
- func (l *LocalFile) GetLocalPath() (path string, err error)
- func (l *LocalFile) GetPath() (path string, err error)
- func (l *LocalFile) GetUriAsString() (uri string, err error)
- func (l LocalFile) IsPathSet() (isSet bool)
- func (l *LocalFile) MustExists() (exists bool)
- func (l *LocalFile) MustGetLocalPath() (path string)
- func (l *LocalFile) MustGetPath() (path string)
- func (l *LocalFile) MustGetUriAsString() (uri string)
- func (l *LocalFile) MustSetPath(path string)
- func (l *LocalFile) SetPath(path string) (err error)
- type PathsService
- type PointersService
- type StructsService
- func (s *StructsService) GetFieldValuesAsString(structToGetFieldsFrom interface{}) (values []string, err error)
- func (s *StructsService) IsPointerToStruct(objectToTest interface{}) (isStruct bool)
- func (s *StructsService) IsStruct(objectToTest interface{}) (isStruct bool)
- func (s *StructsService) IsStructOrPointerToStruct(objectToTest interface{}) (isStruct bool)
- func (s *StructsService) MustGetFieldValuesAsString(structToGetFieldsFrom interface{}) (values []string)
- type TerminalColorsService
- func (t *TerminalColorsService) GetCodeBlack() (code string)
- func (t *TerminalColorsService) GetCodeBlue() (code string)
- func (t *TerminalColorsService) GetCodeBrightBlack() (code string)
- func (t *TerminalColorsService) GetCodeBrightBlue() (code string)
- func (t *TerminalColorsService) GetCodeBrightCyan() (code string)
- func (t *TerminalColorsService) GetCodeBrightGreen() (code string)
- func (t *TerminalColorsService) GetCodeBrightMagenta() (code string)
- func (t *TerminalColorsService) GetCodeBrightRed() (code string)
- func (t *TerminalColorsService) GetCodeBrightWhite() (code string)
- func (t *TerminalColorsService) GetCodeBrightYellow() (code string)
- func (t *TerminalColorsService) GetCodeCyan() (code string)
- func (t *TerminalColorsService) GetCodeGray() (code string)
- func (t *TerminalColorsService) GetCodeGreen() (code string)
- func (t *TerminalColorsService) GetCodeMangenta() (code string)
- func (t *TerminalColorsService) GetCodeNoColor() (code string)
- func (t *TerminalColorsService) GetCodeRed() (code string)
- func (t *TerminalColorsService) GetCodeWhite() (code string)
- func (t *TerminalColorsService) GetCodeYellow() (code string)
- type TestsService
- type TracedErrorType
- func (t TracedErrorType) Error() (errorMessage string)
- func (t *TracedErrorType) GetErrorsToUnwrap() (errorsToUnwrap []error, err error)
- func (t *TracedErrorType) GetFormattedError() (formattedError error, err error)
- func (t *TracedErrorType) GetFunctionCalls() (functionCalls []string, err error)
- func (t *TracedErrorType) MustGetErrorsToUnwrap() (errorsToUnwrap []error)
- func (t *TracedErrorType) MustGetFormattedError() (formattedError error)
- func (t *TracedErrorType) MustGetFunctionCalls() (functionCalls []string)
- func (t *TracedErrorType) MustSetErrorsToUnwrap(errorsToUnwrap []error)
- func (t *TracedErrorType) MustSetFormattedError(formattedError error)
- func (t *TracedErrorType) MustSetFunctionCalls(functionCalls []string)
- func (t *TracedErrorType) SetErrorsToUnwrap(errorsToUnwrap []error) (err error)
- func (t *TracedErrorType) SetFormattedError(formattedError error) (err error)
- func (t *TracedErrorType) SetFunctionCalls(functionCalls []string) (err error)
- func (t TracedErrorType) Unwrap() (errors []error)
Constants ¶
This section is empty.
Variables ¶
var ErrTracedError = errors.New("asciichgolangpublic TracedError base")
var ErrTracedErrorEmptyString = errors.New("asciichgolangpublic TracedError empty string")
var ErrTracedErrorNil = errors.New("asciichgolangpublic TracedError nil")
var ErrTracedErrorNotImplemented = errors.New("asciichgolangpublic TracedError not implemented")
Functions ¶
func LogChanged ¶
func LogChanged(logmessage string)
func LogChangedf ¶
func LogChangedf(logmessage string, args ...interface{})
func LogFatalWithTrace ¶
func LogFatalWithTrace(errorMessageOrError interface{})
func LogFatalWithTracef ¶
func LogFatalWithTracef(logmessage string, args ...interface{})
func LogGoError ¶
func LogGoError(err error)
func LogGoErrorFatal ¶
func LogGoErrorFatal(err error)
func LogGoErrorFatalWithTrace ¶
func LogGoErrorFatalWithTrace(err error)
func MustFormatAsTestname ¶
func MustFormatAsTestname(objectToFormat interface{}) (testname string)
func TracedError ¶
func TracedError(errorMessageOrError interface{}) (tracedError error)
Create a new error with given error or error message. TracedErrors extends the error message by a human readable stack trace.
func TracedErrorEmptyString ¶
func TracedErrorNil ¶
func TracedErrorNilf ¶
func TracedErrorNotImplemented ¶
func TracedErrorNotImplemented() (tracedError error)
func TracedErrorf ¶
Create a new error with given error or error message. TracedErrors extends the error message by a human readable stack trace. Error wrapping using '%w' in format string is supported.
Types ¶
type ErrorsService ¶
type ErrorsService struct{}
func Errors ¶
func Errors() (e *ErrorsService)
func NewErrorsService ¶
func NewErrorsService() (e *ErrorsService)
func (ErrorsService) IsEmptyStringError ¶
func (e ErrorsService) IsEmptyStringError(err error) (isEmptyStringError bool)
func (ErrorsService) IsNilError ¶
func (e ErrorsService) IsNilError(err error) (IsNilError bool)
func (ErrorsService) IsNotImplementedError ¶
func (e ErrorsService) IsNotImplementedError(err error) (isNotImplementedError bool)
func (ErrorsService) IsTracedError ¶
func (e ErrorsService) IsTracedError(err error) (isTracedError bool)
Returns true if given error 'err' is a TracedError, false otherwise.
type File ¶
type File interface {
Exists() (exists bool, err error)
GetLocalPath() (localPath string, err error)
GetUriAsString() (uri string, err error)
MustGetLocalPath() (localPath string)
MustGetUriAsString() (uri string)
}
A File represents any kind of file regardless if a local file or a remote file.
type LocalFile ¶
type LocalFile struct {
// contains filtered or unexported fields
}
A LocalFile represents a locally available file.
func MustNewLocalFileByPath ¶
func NewLocalFile ¶
func NewLocalFile() (l *LocalFile)
func NewLocalFileByPath ¶
func (*LocalFile) GetLocalPath ¶
func (*LocalFile) GetUriAsString ¶
func (*LocalFile) MustExists ¶
func (*LocalFile) MustGetLocalPath ¶
func (*LocalFile) MustGetPath ¶
func (*LocalFile) MustGetUriAsString ¶
func (*LocalFile) MustSetPath ¶
type PathsService ¶
type PathsService struct{}
func NewPathsService ¶
func NewPathsService() (p *PathsService)
func Paths ¶
func Paths() (p *PathsService)
func (*PathsService) IsAbsolutePath ¶
func (p *PathsService) IsAbsolutePath(path string) (isRelative bool)
Returns true if path is an absolute path. An empty string as path will always be false.
func (*PathsService) IsRelativePath ¶
func (p *PathsService) IsRelativePath(path string) (isRelative bool)
Returns true if path is a relative path. An empty string as path will always be false.
type PointersService ¶
type PointersService struct{}
func NewPointersService ¶
func NewPointersService() (p *PointersService)
func Pointers ¶
func Pointers() (pointers *PointersService)
func (*PointersService) IsPointer ¶
func (p *PointersService) IsPointer(objectToTest interface{}) (isPointer bool)
type StructsService ¶
type StructsService struct{}
func NewStructsService ¶
func NewStructsService() (s *StructsService)
func Structs ¶
func Structs() (structs *StructsService)
func (*StructsService) GetFieldValuesAsString ¶
func (s *StructsService) GetFieldValuesAsString(structToGetFieldsFrom interface{}) (values []string, err error)
func (*StructsService) IsPointerToStruct ¶
func (s *StructsService) IsPointerToStruct(objectToTest interface{}) (isStruct bool)
func (*StructsService) IsStruct ¶
func (s *StructsService) IsStruct(objectToTest interface{}) (isStruct bool)
func (*StructsService) IsStructOrPointerToStruct ¶
func (s *StructsService) IsStructOrPointerToStruct(objectToTest interface{}) (isStruct bool)
func (*StructsService) MustGetFieldValuesAsString ¶
func (s *StructsService) MustGetFieldValuesAsString(structToGetFieldsFrom interface{}) (values []string)
type TerminalColorsService ¶
type TerminalColorsService struct{}
func NewTerminalColorsService ¶
func NewTerminalColorsService() (t *TerminalColorsService)
func TerminalColors ¶
func TerminalColors() (terminalColors *TerminalColorsService)
func (*TerminalColorsService) GetCodeBlack ¶
func (t *TerminalColorsService) GetCodeBlack() (code string)
func (*TerminalColorsService) GetCodeBlue ¶
func (t *TerminalColorsService) GetCodeBlue() (code string)
func (*TerminalColorsService) GetCodeBrightBlack ¶
func (t *TerminalColorsService) GetCodeBrightBlack() (code string)
func (*TerminalColorsService) GetCodeBrightBlue ¶
func (t *TerminalColorsService) GetCodeBrightBlue() (code string)
func (*TerminalColorsService) GetCodeBrightCyan ¶
func (t *TerminalColorsService) GetCodeBrightCyan() (code string)
func (*TerminalColorsService) GetCodeBrightGreen ¶
func (t *TerminalColorsService) GetCodeBrightGreen() (code string)
func (*TerminalColorsService) GetCodeBrightMagenta ¶
func (t *TerminalColorsService) GetCodeBrightMagenta() (code string)
func (*TerminalColorsService) GetCodeBrightRed ¶
func (t *TerminalColorsService) GetCodeBrightRed() (code string)
func (*TerminalColorsService) GetCodeBrightWhite ¶
func (t *TerminalColorsService) GetCodeBrightWhite() (code string)
func (*TerminalColorsService) GetCodeBrightYellow ¶
func (t *TerminalColorsService) GetCodeBrightYellow() (code string)
func (*TerminalColorsService) GetCodeCyan ¶
func (t *TerminalColorsService) GetCodeCyan() (code string)
func (*TerminalColorsService) GetCodeGray ¶
func (t *TerminalColorsService) GetCodeGray() (code string)
func (*TerminalColorsService) GetCodeGreen ¶
func (t *TerminalColorsService) GetCodeGreen() (code string)
func (*TerminalColorsService) GetCodeMangenta ¶
func (t *TerminalColorsService) GetCodeMangenta() (code string)
func (*TerminalColorsService) GetCodeNoColor ¶
func (t *TerminalColorsService) GetCodeNoColor() (code string)
func (*TerminalColorsService) GetCodeRed ¶
func (t *TerminalColorsService) GetCodeRed() (code string)
func (*TerminalColorsService) GetCodeWhite ¶
func (t *TerminalColorsService) GetCodeWhite() (code string)
func (*TerminalColorsService) GetCodeYellow ¶
func (t *TerminalColorsService) GetCodeYellow() (code string)
type TestsService ¶
type TestsService struct{}
func NewTestsService ¶
func NewTestsService() (t *TestsService)
func Tests ¶
func Tests() (tests *TestsService)
func (*TestsService) FormatAsTestname ¶
func (t *TestsService) FormatAsTestname(objectToFormat interface{}) (testname string, err error)
func (*TestsService) MustFormatAsTestname ¶
func (t *TestsService) MustFormatAsTestname(objectToFormat interface{}) (testname string)
type TracedErrorType ¶
type TracedErrorType struct {
// contains filtered or unexported fields
}
func NewTracedErrorType ¶
func NewTracedErrorType() (t *TracedErrorType)
func (TracedErrorType) Error ¶
func (t TracedErrorType) Error() (errorMessage string)
func (*TracedErrorType) GetErrorsToUnwrap ¶
func (t *TracedErrorType) GetErrorsToUnwrap() (errorsToUnwrap []error, err error)
func (*TracedErrorType) GetFormattedError ¶
func (t *TracedErrorType) GetFormattedError() (formattedError error, err error)
func (*TracedErrorType) GetFunctionCalls ¶
func (t *TracedErrorType) GetFunctionCalls() (functionCalls []string, err error)
func (*TracedErrorType) MustGetErrorsToUnwrap ¶
func (t *TracedErrorType) MustGetErrorsToUnwrap() (errorsToUnwrap []error)
func (*TracedErrorType) MustGetFormattedError ¶
func (t *TracedErrorType) MustGetFormattedError() (formattedError error)
func (*TracedErrorType) MustGetFunctionCalls ¶
func (t *TracedErrorType) MustGetFunctionCalls() (functionCalls []string)
func (*TracedErrorType) MustSetErrorsToUnwrap ¶
func (t *TracedErrorType) MustSetErrorsToUnwrap(errorsToUnwrap []error)
func (*TracedErrorType) MustSetFormattedError ¶
func (t *TracedErrorType) MustSetFormattedError(formattedError error)
func (*TracedErrorType) MustSetFunctionCalls ¶
func (t *TracedErrorType) MustSetFunctionCalls(functionCalls []string)
func (*TracedErrorType) SetErrorsToUnwrap ¶
func (t *TracedErrorType) SetErrorsToUnwrap(errorsToUnwrap []error) (err error)
func (*TracedErrorType) SetFormattedError ¶
func (t *TracedErrorType) SetFormattedError(formattedError error) (err error)
func (*TracedErrorType) SetFunctionCalls ¶
func (t *TracedErrorType) SetFunctionCalls(functionCalls []string) (err error)
func (TracedErrorType) Unwrap ¶
func (t TracedErrorType) Unwrap() (errors []error)
