refactor: plugin code structure

This commit is contained in:
debugtalk
2022-03-05 00:34:55 +08:00
parent 1904d404fd
commit 0ede8d7989
27 changed files with 297 additions and 25 deletions

View File

@@ -13,7 +13,8 @@ import (
"github.com/rs/zerolog/log"
"github.com/httprunner/hrp/internal/builtin"
pluginInternal "github.com/httprunner/hrp/plugin/inner"
pluginInternal "github.com/httprunner/hrp/plugin/go"
pluginUtils "github.com/httprunner/hrp/plugin/utils"
)
func newParser() *parser {
@@ -252,7 +253,7 @@ func (p *parser) callFunc(funcName string, arguments ...interface{}) (interface{
fn := reflect.ValueOf(function)
// call with builtin function
return pluginInternal.CallFunc(fn, arguments...)
return pluginUtils.CallFunc(fn, arguments...)
}
// merge two variables mapping, the first variables have higher priority