errmsg

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyVar

func AnyVar(variableName string, value interface{}) string

Returns variableName + constants.SpaceColonSpace + value

func CannotBeNull

func CannotBeNull(
	additionalMsg,
	varName string,
	val interface{},
) string

func EmptyArray

func EmptyArray(
	additionalMsg,
	varName string,
	val interface{},
) string

func EmptyItems

func EmptyItems(
	additionalMsg,
	varName string,
	val interface{},
) string

func EmptyStatus

func EmptyStatus(
	additionalMsg,
	varName string,
	val interface{},
) string

func EmptyValueVariableNamesReference

func EmptyValueVariableNamesReference(names ...string) *[]ref.Value

func File

func File(additionalMsg, filePath string) string

func FloatOutOfRange

func FloatOutOfRange(
	additionalMsg,
	varName string,
	val interface{},
) string

func IntegerOutOfRange

func IntegerOutOfRange(
	additionalMsg,
	varName string,
	val interface{},
) string

func LengthShouldBeEqual

func LengthShouldBeEqual(
	additionalMsg,
	varName string,
	val interface{},
) string

func Msg

func Msg(message, variableName, variableValue string) string

Returns "Error : message reference ( variableName constants.SpaceColonSpace variableValue )"

func MsgForPath

func MsgForPath(path, message, variableName, variableValue string) string

Returns Path : path + GetMsg(message, variableName, variableValue string)

func NegativeValue

func NegativeValue(
	additionalMsg,
	varName string,
	val interface{},
) string

func NegativeValueWithType

func NegativeValueWithType(
	additionalMsg,
	varName string,
	val interface{},
) string

Returns "Cannot be negative value. Reference ( " + VarWithType(typeName, variableName, printVal) + " )" Type name included

func NonImplMsg

func NonImplMsg(url string) string

Not implemented message if url empty then returns constants.NotImplemented else returns constants.NotImplemented + " : [TODO] Will be solved at (" + url + ")"

func Null

func Null(
	additionalMsg,
	varName string,
	val interface{},
) string

func NullOrEmpty

func NullOrEmpty(
	additionalMsg,
	varName string,
	val interface{},
) string

func NullValueVariableNamesReference

func NullValueVariableNamesReference(names ...string) *[]ref.Value

func ShouldBeEqual

func ShouldBeEqual(
	additionalMsg,
	varName string,
	val interface{},
) string

func ShouldBeGreater

func ShouldBeGreater(
	additionalMsg,
	varName string,
	val interface{},
) string

Returns SimpleValMsg(ShouldBeGreaterThanMessage, variableName, numberValue)

func ShouldBeGreaterEqual

func ShouldBeGreaterEqual(
	additionalMsg,
	varName string,
	val interface{},
) string

func ShouldBeLess

func ShouldBeLess(
	additionalMsg,
	varName string,
	val interface{},
) string

func ShouldBeLessOrEqual

func ShouldBeLessOrEqual(
	additionalMsg,
	varName string,
	val interface{},
) string

func ShouldBeLessOrEqualWithType

func ShouldBeLessOrEqualWithType(
	additionalMsg,
	varName string,
	val interface{},
) string

Returns SimpleValMsgWithType(ShouldBeLessThanEqualMessage, variableName, numberValue) Type name included

func ShouldBeLessWithType

func ShouldBeLessWithType(
	additionalMsg,
	varName string,
	val interface{},
) string

Returns SimpleValMsgWithType(ShouldBeLessThan, variableName, numberValue) Type name included

func SimpleValMsg

func SimpleValMsg(
	msg,
	variableName string,
	value interface{},
) string

Returns errconsts.ErrorStart + msg + errconsts.ReferenceStart + Var(variableName, printVal) + errconsts.SpaceParenthesisEnd Type name NOT included

func SimpleValMsgUsingMsgType

func SimpleValMsgUsingMsgType(
	msgVariant msgtype.Variation,
	additionalMsg,
	variableName string,
	value interface{},
) string

func SimpleValMsgWithType

func SimpleValMsgWithType(msg, variableName string, value interface{}) string

Returns msg + errconsts.ReferenceStart + VarWithType(typeName, variableName, printVal) + errconsts.SpaceParenthesisEnd Type name included

func SimpleValMsgsUsingReferencesWithType

func SimpleValMsgsUsingReferencesWithType(msg string, referenceValues *[]ref.Value) string

Returns msg + errconsts.ReferenceStart + VarWithType(typeName, variableName, printVal) + errconsts.SpaceParenthesisEnd Type name included

func SimpleValMsgsWithType

func SimpleValMsgsWithType(msg string, referenceValues ...ref.Value) string

Returns msg + errconsts.ReferenceStart + VarWithType(typeName, variableName, printVal) + errconsts.SpaceParenthesisEnd Type name included

func StringOutOfRange

func StringOutOfRange(
	additionalMsg,
	varName string,
	val interface{},
) string

func UnexpectedType

func UnexpectedType(
	additionalMsg,
	varName string,
	val interface{},
) string

func UnexpectedValue

func UnexpectedValue(
	additionalMsg,
	varName string,
	val interface{},
) string

func Var

func Var(variableName, value string) string

Returns variableName + constants.SpaceColonSpace + value

func VarWithType

func VarWithType(typeName, variableName, value string) string

Returns variableName + "[" + typeName + "]" + constants.SpaceColonSpace + value

Types

This section is empty.

Jump to

Keyboard shortcuts

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