mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-30 12:59:39 +08:00
change: upgrade funplugin to v0.3.0
This commit is contained in:
@@ -72,7 +72,7 @@ var demoPlugin = `package main
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
plugin "github.com/httprunner/func-plugin/go"
|
||||
"github.com/httprunner/funplugin/fungo"
|
||||
)
|
||||
|
||||
func SumTwoInt(a, b int) int {
|
||||
@@ -111,12 +111,12 @@ func TeardownHookExample(args string) string {
|
||||
}
|
||||
|
||||
func main() {
|
||||
plugin.Register("sum_ints", SumInts)
|
||||
plugin.Register("sum_two_int", SumTwoInt)
|
||||
plugin.Register("sum", Sum)
|
||||
plugin.Register("setup_hook_example", SetupHookExample)
|
||||
plugin.Register("teardown_hook_example", TeardownHookExample)
|
||||
plugin.Serve()
|
||||
fungo.Register("sum_ints", SumInts)
|
||||
fungo.Register("sum_two_int", SumTwoInt)
|
||||
fungo.Register("sum", Sum)
|
||||
fungo.Register("setup_hook_example", SetupHookExample)
|
||||
fungo.Register("teardown_hook_example", TeardownHookExample)
|
||||
fungo.Serve()
|
||||
}
|
||||
`
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ func CreateScaffold(projectName string) error {
|
||||
}
|
||||
|
||||
// download plugin dependency
|
||||
if err := builtin.ExecCommand(exec.Command("go", "get", "github.com/httprunner/func-plugin"), pluginDir); err != nil {
|
||||
if err := builtin.ExecCommand(exec.Command("go", "get", "github.com/httprunner/funplugin"), pluginDir); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user