Migrate WASM Go Plugins to New SDK and Go 1.24 (#2532)

This commit is contained in:
xingpiaoliang
2025-07-11 10:43:00 +08:00
committed by GitHub
parent 9a45f07972
commit 081ab6ee8d
274 changed files with 2073 additions and 2165 deletions

View File

@@ -80,8 +80,8 @@ import (
"net/http"
"my-mcp-server/config"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/server"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/utils"
"github.com/higress-group/wasm-go/pkg/mcp/server"
"github.com/higress-group/wasm-go/pkg/mcp/utils"
)
// Define your tool structure with input parameters
@@ -145,8 +145,8 @@ For better organization, you can create a separate file to load all your tools:
package tools
import (
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/server"
"github.com/higress-group/wasm-go/pkg/mcp"
"github.com/higress-group/wasm-go/pkg/mcp/server"
)
func LoadTools(server *mcp.MCPServer) server.Server {
@@ -170,7 +170,7 @@ import (
amap "amap-tools/tools"
quark "quark-search/tools"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp"
"github.com/higress-group/wasm-go/pkg/mcp"
)
func main() {}
@@ -375,7 +375,7 @@ package main
import (
"my-mcp-server/tools"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp"
"github.com/higress-group/wasm-go/pkg/mcp"
)
func main() {}