mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-02 14:29:44 +08:00
change: upgrade funplugin to 0.5.2
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/httprunner/funplugin/shared"
|
||||
"github.com/httprunner/funplugin/fungo"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
@@ -142,7 +142,7 @@ func (pt *pluginTemplate) generateGo(output string) error {
|
||||
|
||||
// download plugin dependency
|
||||
// funplugin version should be locked
|
||||
funplugin := fmt.Sprintf("github.com/httprunner/funplugin@%s", shared.Version)
|
||||
funplugin := fmt.Sprintf("github.com/httprunner/funplugin@%s", fungo.Version)
|
||||
if err := myexec.ExecCommandInDir(myexec.Command("go", "get", funplugin), pluginDir); err != nil {
|
||||
return errors.Wrap(err, "go get funplugin failed")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/httprunner/funplugin"
|
||||
"github.com/httprunner/funplugin/shared"
|
||||
"github.com/httprunner/funplugin/fungo"
|
||||
"github.com/maja42/goval"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rs/zerolog/log"
|
||||
@@ -283,7 +283,7 @@ func (p *Parser) callFunc(funcName string, arguments ...interface{}) (interface{
|
||||
if p.plugin.Has(funcName) {
|
||||
return p.plugin.Call(funcName, arguments...)
|
||||
}
|
||||
commonName := shared.ConvertCommonName(funcName)
|
||||
commonName := fungo.ConvertCommonName(funcName)
|
||||
if p.plugin.Has(commonName) {
|
||||
return p.plugin.Call(commonName, arguments...)
|
||||
}
|
||||
@@ -297,7 +297,7 @@ func (p *Parser) callFunc(funcName string, arguments ...interface{}) (interface{
|
||||
fn := reflect.ValueOf(function)
|
||||
|
||||
// call with builtin function
|
||||
return shared.CallFunc(fn, arguments...)
|
||||
return fungo.CallFunc(fn, arguments...)
|
||||
}
|
||||
|
||||
// merge two variables mapping, the first variables have higher priority
|
||||
|
||||
@@ -53,7 +53,7 @@ func initPlugin(path, venv string, logOn bool) (plugin funplugin.IPlugin, err er
|
||||
return p.(funplugin.IPlugin), nil
|
||||
}
|
||||
|
||||
pluginOptions := []funplugin.Option{funplugin.WithLogOn(logOn)}
|
||||
pluginOptions := []funplugin.Option{funplugin.WithDebugLogger(logOn)}
|
||||
|
||||
if strings.HasSuffix(pluginPath, ".py") {
|
||||
// register funppy plugin
|
||||
|
||||
Reference in New Issue
Block a user