Documentation
¶
Index ¶
- type IsDynamicCompareFunc
- type IsLineCompareFunc
- type Variant
- func (it *Variant) AsBasicByteEnumContractsBinder() coreinterface.BasicByteEnumContractsBinder
- func (it *Variant) AsBasicEnumContractsBinder() coreinterface.BasicEnumContractsBinder
- func (it Variant) DynamicCompare(isDynamicCompareFunc IsDynamicCompareFunc, lineNumber int, content string) bool
- func (it Variant) Is(compare Variant) bool
- func (it Variant) IsAnyChars() bool
- func (it Variant) IsAnywhere() bool
- func (it Variant) IsCompareSuccess(isIgnoreCase bool, content, search string) bool
- func (it *Variant) IsCompareSuccessCaseSensitive(content, search string) bool
- func (it *Variant) IsCompareSuccessNonCaseSensitive(content, search string) bool
- func (it Variant) IsContains() bool
- func (it Variant) IsEndsWith() bool
- func (it Variant) IsEqual() bool
- func (it Variant) IsLineCompareFunc() IsLineCompareFunc
- func (it Variant) IsNegativeCondition() bool
- func (it Variant) IsNotContains() bool
- func (it Variant) IsNotEndsWith() bool
- func (it Variant) IsNotEqual() bool
- func (it Variant) IsNotMatchRegex() bool
- func (it Variant) IsNotStartsWith() bool
- func (it Variant) IsRegex() bool
- func (it Variant) IsStartsWith() bool
- func (it Variant) MarshalJSON() ([]byte, error)
- func (it *Variant) MaxByte() byte
- func (it *Variant) MinByte() byte
- func (it *Variant) Name() string
- func (it Variant) NameValue() string
- func (it *Variant) RangeNamesCsv() string
- func (it *Variant) RangesByte() []byte
- func (it Variant) String() string
- func (it *Variant) ToNumberString() string
- func (it *Variant) TypeName() string
- func (it *Variant) UnmarshalJSON(data []byte) error
- func (it *Variant) UnmarshallEnumToValue(jsonUnmarshallingValue []byte) (byte, error)
- func (it *Variant) ValueByte() byte
- func (it Variant) VerifyError(isIgnoreCase bool, content, search string) error
- func (it Variant) VerifyErrorCaseSensitive(content, search string) error
- func (it Variant) VerifyMessage(isIgnoreCase bool, content, search string) string
- func (it Variant) VerifyMessageCaseSensitive(content, search string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IsDynamicCompareFunc ¶
type IsLineCompareFunc ¶
type Variant ¶
type Variant byte
const ( Equal Variant = iota StartsWith EndsWith Anywhere Contains // alias for Anywhere AnyChars // If given search chars is found in the content // Regex strings will be cached and // compiled using map, mutex // will be used to lock, // if failed to compile then panic Regex NotEqual // invert of Equal NotStartsWith // invert of StartsWith NotEndsWith // invert of EndsWith NotContains // invert of Anywhere NotAnyChars // invert of AnyChars NotMatchRegex // invert of Regex )
func (*Variant) AsBasicByteEnumContractsBinder ¶
func (it *Variant) AsBasicByteEnumContractsBinder() coreinterface.BasicByteEnumContractsBinder
func (*Variant) AsBasicEnumContractsBinder ¶
func (it *Variant) AsBasicEnumContractsBinder() coreinterface.BasicEnumContractsBinder
func (Variant) DynamicCompare ¶
func (it Variant) DynamicCompare( isDynamicCompareFunc IsDynamicCompareFunc, lineNumber int, content string, ) bool
func (Variant) IsAnyChars ¶
func (Variant) IsAnywhere ¶
func (Variant) IsCompareSuccess ¶
IsCompareSuccess Regex case has no use, use regex pattern for case sensitive or insensitive search
Regex will be cached to map for the syntax, if running twice it will not create new but the same one from the map. It save the regex into map using mutex lock, so async codes can run.
func (*Variant) IsCompareSuccessCaseSensitive ¶
IsCompareSuccessCaseSensitive for Regex case has no use, use regex pattern for case sensitive or insensitive search
func (*Variant) IsCompareSuccessNonCaseSensitive ¶
IsCompareSuccessNonCaseSensitive for Regex case has no use, use regex pattern for case sensitive or insensitive search
func (Variant) IsContains ¶
func (Variant) IsEndsWith ¶
func (Variant) IsLineCompareFunc ¶
func (it Variant) IsLineCompareFunc() IsLineCompareFunc
IsLineCompareFunc for Regex case has no use, use regex pattern for case sensitive or insensitive search
Functions Mapping:
Equal: isEqualFunc, StartsWith: isStartsWithFunc, EndsWith: isEndsWithFunc, Anywhere: isAnywhereFunc, AnyChars: isAnyCharsFunc, Contains: isAnywhereFunc, Regex: isRegexFunc, NotEqual: isNotEqualFunc, NotStartsWith: isNotStartsWithFunc, NotEndsWith: isNotEndsWithFunc, NotContains: isNotContainsFunc, NotAnyChars: isNotAnyCharsFunc, NotMatchRegex: isNotMatchRegex,
func (Variant) IsNegativeCondition ¶
IsNegativeCondition returns true for any of the cases mentioned in negativeCases
NotEqual // invert of Equal NotStartsWith // invert of StartsWith NotEndsWith // invert of EndsWith NotContains // invert of Anywhere NotAnyChars // invert of AnyChars NotMatchRegex // invert of Regex