You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2025/03/09 03:36:08 UTC

(dubbo-go-samples) branch main updated: fix import (#803)

This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git


The following commit(s) were added to refs/heads/main by this push:
     new dfd7f5e4 fix import (#803)
dfd7f5e4 is described below

commit dfd7f5e425c26f7fbacdfd016f0da7c4f79f4e72
Author: Alan <m1...@163.com>
AuthorDate: Sun Mar 9 11:36:04 2025 +0800

    fix import (#803)
---
 llm/go-client/cmd/client.go             |  2 ++
 llm/go-client/frontend/handlers/chat.go |  8 +++++---
 llm/go-client/frontend/main.go          | 10 ++++++----
 llm/go-server/cmd/server.go             |  6 ++++--
 4 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/llm/go-client/cmd/client.go b/llm/go-client/cmd/client.go
index 23411724..d63e141c 100644
--- a/llm/go-client/cmd/client.go
+++ b/llm/go-client/cmd/client.go
@@ -28,7 +28,9 @@ import (
 import (
 	"dubbo.apache.org/dubbo-go/v3/client"
 	_ "dubbo.apache.org/dubbo-go/v3/imports"
+)
 
+import (
 	chat "github.com/apache/dubbo-go-samples/llm/proto"
 )
 
diff --git a/llm/go-client/frontend/handlers/chat.go b/llm/go-client/frontend/handlers/chat.go
index 2f62c520..c65ab5d9 100644
--- a/llm/go-client/frontend/handlers/chat.go
+++ b/llm/go-client/frontend/handlers/chat.go
@@ -28,14 +28,16 @@ import (
 )
 
 import (
-	"github.com/apache/dubbo-go-samples/llm/go-client/frontend/service"
-	chat "github.com/apache/dubbo-go-samples/llm/proto"
-
 	"github.com/gin-contrib/sessions"
 
 	"github.com/gin-gonic/gin"
 )
 
+import (
+	"github.com/apache/dubbo-go-samples/llm/go-client/frontend/service"
+	chat "github.com/apache/dubbo-go-samples/llm/proto"
+)
+
 type ChatHandler struct {
 	svc        chat.ChatService
 	ctxManager *service.ContextManager
diff --git a/llm/go-client/frontend/main.go b/llm/go-client/frontend/main.go
index 5a48a04c..259d97c0 100644
--- a/llm/go-client/frontend/main.go
+++ b/llm/go-client/frontend/main.go
@@ -25,16 +25,18 @@ import (
 	"dubbo.apache.org/dubbo-go/v3/client"
 	_ "dubbo.apache.org/dubbo-go/v3/imports"
 
-	"github.com/apache/dubbo-go-samples/llm/go-client/frontend/handlers"
-	"github.com/apache/dubbo-go-samples/llm/go-client/frontend/service"
-	chat "github.com/apache/dubbo-go-samples/llm/proto"
-
 	"github.com/gin-contrib/sessions"
 	"github.com/gin-contrib/sessions/cookie"
 
 	"github.com/gin-gonic/gin"
 )
 
+import (
+	"github.com/apache/dubbo-go-samples/llm/go-client/frontend/handlers"
+	"github.com/apache/dubbo-go-samples/llm/go-client/frontend/service"
+	chat "github.com/apache/dubbo-go-samples/llm/proto"
+)
+
 func main() {
 	// init Dubbo
 	cli, err := client.NewClient(
diff --git a/llm/go-server/cmd/server.go b/llm/go-server/cmd/server.go
index 0a438ea3..c4e752fb 100644
--- a/llm/go-server/cmd/server.go
+++ b/llm/go-server/cmd/server.go
@@ -29,12 +29,14 @@ import (
 	"dubbo.apache.org/dubbo-go/v3/protocol"
 	"dubbo.apache.org/dubbo-go/v3/server"
 
-	chat "github.com/apache/dubbo-go-samples/llm/proto"
-
 	"github.com/tmc/langchaingo/llms"
 	"github.com/tmc/langchaingo/llms/ollama"
 )
 
+import (
+	chat "github.com/apache/dubbo-go-samples/llm/proto"
+)
+
 type ChatServer struct {
 	llm *ollama.LLM
 }