test
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

master v1.0.0
icechen 2021-12-30 01:16:32 +08:00
parent bad04e55e9
commit e1a02c8afb
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ func main() {
return err
}
return c.JSON(userInfo)
return c.JSON(userInfo.Name)
})
err := app.Listen(":8080")
if err != nil {

View File

@ -9,7 +9,7 @@ import (
// GetServiceConn 获取服务的连接
func GetServiceConn(serviceName string) *grpc.ClientConn {
target := strings.ToUpper(os.Getenv("SERVICE_" + serviceName))
target := os.Getenv(strings.ToUpper("SERVICE_" + serviceName))
cli, err := grpc.Dial(target, grpc.WithInsecure())
if err != nil {
fmt.Println("target: " + target + " err: " + err.Error())