diff --git a/app/brahma/api/murder/internal/handler/scripts_h.go b/app/brahma/api/murder/internal/handler/scripts_h.go index 2a6c534..811b7ce 100644 --- a/app/brahma/api/murder/internal/handler/scripts_h.go +++ b/app/brahma/api/murder/internal/handler/scripts_h.go @@ -1,19 +1,14 @@ package handler import ( - "context" "fmt" "git.icechen.cn/monorepo/backend/app/brahma/api/murder/internal/error_process" "git.icechen.cn/monorepo/backend/app/brahma/api/murder/internal/model" "git.icechen.cn/monorepo/backend/app/brahma/api/murder/internal/service" - "git.icechen.cn/monorepo/backend/pkg/proto/brahma/murder" "github.com/gofiber/fiber/v2" ctxLogger "github.com/luizsuper/ctxLoggers" "go.uber.org/zap" - "google.golang.org/grpc" - "log" "strconv" - "time" ) func GetScriptsH(ctx *fiber.Ctx) error { @@ -81,23 +76,23 @@ func DeleteScriptsH(ctx *fiber.Ctx) error { return ctx.JSON(success(nil)) } -func HelloWorld() error { - // Set up a connection to the server. - conn, err := grpc.Dial("localhost:3000", grpc.WithInsecure(), grpc.WithBlock()) - if err != nil { - log.Fatalf("did not connect: %v", err) - } - defer conn.Close() - c := murder.NewHelloWorldClient(conn) - - // Contact the server and print out its response. - ctx, cancel := context.WithTimeout(context.Background(), time.Second) - defer cancel() - r, err := c.Login(ctx, &murder.HelloRequest{Code: "lht"}) - - if err != nil { - log.Fatalf("could not greet: %v", err) - } - log.Printf("Greeting: %s", r.Token) - return nil -} +//func HelloWorld() error { +// // Set up a connection to the server. +// conn, err := grpc.Dial("localhost:3000", grpc.WithInsecure(), grpc.WithBlock()) +// if err != nil { +// log.Fatalf("did not connect: %v", err) +// } +// defer conn.Close() +// c := murder.NewHelloWorldClient(conn) +// +// // Contact the server and print out its response. +// ctx, cancel := context.WithTimeout(context.Background(), time.Second) +// defer cancel() +// r, err := c.Login(ctx, &murder.HelloRequest{Code: "lht"}) +// +// if err != nil { +// log.Fatalf("could not greet: %v", err) +// } +// log.Printf("Greeting: %s", r.Token) +// return nil +//}