Documentation ¶
Index ¶
Constants ¶
View Source
const (
AgreeString = "Точно!"
)
Variables ¶
View Source
var ( NumberMatcher = NewRegexMather(`[\-]{0,1}[0-9]+[\.][0-9]+|[\-]{0,1}[0-9]+`) PositiveNumberMatcher = NewRegexMather(`^\+?(0*[1-9]\d*(?:[\., ]\d+)*) *(?:\p{Sc}|°[FC])?$`) AnyMatcher = NewRegexMather(`.*`) FirstWord = NewRegexMather(`[^\s]+`) PositiveNumberError = scene.BaseTextError{ Message: positiveNumberErrorString, } NumberError = scene.BaseTextError{ Message: numberErrorString, } )
View Source
var ( Agree = NewSelectorMatcher( []string{ "Точно", "Согласен", "Да", "Ага", }, AgreeString, ) )
Functions ¶
This section is empty.
Types ¶
type RegexMatcher ¶
type RegexMatcher struct {
// contains filtered or unexported fields
}
func NewRegexMather ¶
func NewRegexMather(pattern string) *RegexMatcher
type SelectorMatcher ¶
type SelectorMatcher struct {
// contains filtered or unexported fields
}
func NewSelectorMatcher ¶
func NewSelectorMatcher(variants []string, replaceMessage string) *SelectorMatcher
Click to show internal directories.
Click to hide internal directories.