Update matchers.go

dev
Ice3man 2020-04-24 06:54:46 +05:30 committed by GitHub
parent 2c58a33913
commit 0290c9ac8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -11,6 +11,8 @@ type Matcher struct {
// matcherType is the internal type of the matcher // matcherType is the internal type of the matcher
matcherType MatcherType matcherType MatcherType
// Name is matcher Name to be displayed in result output.
Name string `yaml:"name,omitempty"`
// Status are the acceptable status codes for the response // Status are the acceptable status codes for the response
Status []int `yaml:"status,omitempty"` Status []int `yaml:"status,omitempty"`
// Size is the acceptable size for the response // Size is the acceptable size for the response
@ -19,12 +21,10 @@ type Matcher struct {
Words []string `yaml:"words,omitempty"` Words []string `yaml:"words,omitempty"`
// Regex are the regex pattern required to be present in the response // Regex are the regex pattern required to be present in the response
Regex []string `yaml:"regex,omitempty"` Regex []string `yaml:"regex,omitempty"`
// regexCompiled is the compiled variant
regexCompiled []*regexp.Regexp
// Binary are the binary characters required to be present in the response // Binary are the binary characters required to be present in the response
Binary []string `yaml:"binary,omitempty"` Binary []string `yaml:"binary,omitempty"`
// regexCompiled is the compiled variant
// Matcher Name to be displayed in result output.
Name string `yaml:"name,omitempty"`
regexCompiled []*regexp.Regexp
// Condition is the optional condition between two matcher variables // Condition is the optional condition between two matcher variables
// //
@ -50,7 +50,7 @@ const (
// RegexMatcher matches responses with regexes // RegexMatcher matches responses with regexes
RegexMatcher RegexMatcher
// BinaryMatcher matches responses with words // BinaryMatcher matches responses with words
BinaryMatcher MatcherType = iota + 2 BinaryMatcher
// StatusMatcher matches responses with status codes // StatusMatcher matches responses with status codes
StatusMatcher StatusMatcher
// SizeMatcher matches responses with response size // SizeMatcher matches responses with response size