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

@@ -9,7 +9,8 @@ import (
"github.com/hashicorp/go-plugin"
"github.com/rs/zerolog/log"
pluginInternal "github.com/httprunner/hrp/plugin/inner"
pluginInternal "github.com/httprunner/hrp/plugin/go"
pluginUtils "github.com/httprunner/hrp/plugin/utils"
)
// functionsMap stores plugin functions
@@ -37,7 +38,7 @@ func (p *functionPlugin) Call(funcName string, args ...interface{}) (interface{}
return nil, fmt.Errorf("function %s not found", funcName)
}
return pluginInternal.CallFunc(fn, args...)
return pluginUtils.CallFunc(fn, args...)
}
var functions = make(functionsMap)