fixing linting

This commit is contained in:
Mzack9999 2020-10-23 10:41:49 +02:00
parent 0ae73711fc
commit 2a8aaeaa2e
3 changed files with 7 additions and 7 deletions

View File

@ -436,7 +436,7 @@ func (e *HTTPExecuter) handleHTTP(reqURL string, request *requests.HTTPRequest,
// hardcode stopping storing data after 100 items (approximately 20 requests)
if len(result.historyData) < 150 {
result.Lock()
result.historyData = generators.MergeMaps(result.historyData, matchers.HttpToMap(resp, body, headers, duration, format))
result.historyData = generators.MergeMaps(result.historyData, matchers.HTTPToMap(resp, body, headers, duration, format))
result.Unlock()
}

View File

@ -46,7 +46,7 @@ func (m *Matcher) Match(resp *http.Response, body, headers string, duration time
}
case DSLMatcher:
// Match complex query
return m.isNegative(m.matchDSL(generators.MergeMaps(HttpToMap(resp, body, headers, duration, ""), data)))
return m.isNegative(m.matchDSL(generators.MergeMaps(HTTPToMap(resp, body, headers, duration, ""), data)))
}
return false
@ -69,7 +69,7 @@ func (m *Matcher) MatchDNS(msg *dns.Msg) bool {
return m.matchBinary(msg.String())
case DSLMatcher:
// Match complex query
return m.matchDSL(DnsToMap(msg, ""))
return m.matchDSL(DNSToMap(msg, ""))
}
return false

View File

@ -12,8 +12,8 @@ import (
const defaultFormat = "%s"
// HttpToMap Converts HTTP to Matcher Map
func HttpToMap(resp *http.Response, body, headers string, duration time.Duration, format string) (m map[string]interface{}) {
// HTTPToMap Converts HTTP to Matcher Map
func HTTPToMap(resp *http.Response, body, headers string, duration time.Duration, format string) (m map[string]interface{}) {
m = make(map[string]interface{})
if format == "" {
@ -41,8 +41,8 @@ func HttpToMap(resp *http.Response, body, headers string, duration time.Duration
return m
}
// DnsToMap Converts DNS to Matcher Map
func DnsToMap(msg *dns.Msg, format string) (m map[string]interface{}) {
// DNSToMap Converts DNS to Matcher Map
func DNSToMap(msg *dns.Msg, format string) (m map[string]interface{}) {
m = make(map[string]interface{})
if format == "" {