fix #1288: unable to go get httprunner v4

This commit is contained in:
debugtalk
2022-05-09 18:49:24 +08:00
parent 17c7699cee
commit 24effeccdb
48 changed files with 92 additions and 90 deletions

View File

@@ -14,8 +14,8 @@ import (
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
"github.com/httprunner/httprunner/hrp/internal/builtin"
"github.com/httprunner/httprunner/hrp/internal/json"
"github.com/httprunner/httprunner/v4/hrp/internal/builtin"
"github.com/httprunner/httprunner/v4/hrp/internal/json"
)
var fieldTags = []string{"proto", "status_code", "headers", "cookies", "body", textExtractorSubRegexp}
@@ -268,7 +268,7 @@ func (v *responseObject) searchRegexp(expr string) interface{} {
}
match := regexpCompile.FindStringSubmatch(bodyStr)
if len(match) > 1 {
return match[1] //return first matched result in parentheses
return match[1] // return first matched result in parentheses
}
log.Error().Str("expr", expr).Msg("search regexp failed")
return expr