Skip to content

Commit

Permalink
keep consistent between code and readme on service and client name
Browse files Browse the repository at this point in the history
  • Loading branch information
whalecold committed Sep 18, 2023
1 parent a8bdf3c commit 64a829d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func main() {
if err != nil {
panic(err)
}
serviceName := "server"
serviceName := "ServiceName"
svr := echo.NewServer(
new(EchoImpl),
server.WithServerBasicInfo(&rpcinfo.EndpointBasicInfo{ServiceName: serviceName}),
Expand Down Expand Up @@ -87,8 +87,8 @@ func main() {
klog.Infof("nacos config %v", cp)
}

serviceName := "server"
clientName := "client"
serviceName := "ServiceName"
clientName := "ClientName"
client, err := echo.NewClient(
serviceName,
client.WithHostPorts("0.0.0.0:8888"),
Expand Down
6 changes: 3 additions & 3 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func main() {
if err != nil {
panic(err)
}
serviceName := "server"
serviceName := "ServiceName"
svr := echo.NewServer(
new(EchoImpl),
server.WithServerBasicInfo(&rpcinfo.EndpointBasicInfo{ServiceName: serviceName}),
Expand Down Expand Up @@ -87,8 +87,8 @@ func main() {
klog.Infof("nacos config %v", cp)
}

serviceName := "server"
clientName := "client"
serviceName := "ServiceName"
clientName := "ClientName"
client, err := echo.NewClient(
serviceName,
client.WithHostPorts("0.0.0.0:8888"),
Expand Down
6 changes: 4 additions & 2 deletions example/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package main
import (
"context"
"log"
"time"

"github.com/cloudwego/kitex-examples/kitex_gen/api"
"github.com/cloudwego/kitex-examples/kitex_gen/api/echo"
Expand All @@ -40,8 +41,8 @@ func main() {
klog.Infof("nacos config %v", cp)
}

serviceName := "echo"
clientName := "test"
serviceName := "ServiceName"
clientName := "ClientName"
client, err := echo.NewClient(
serviceName,
client.WithHostPorts("0.0.0.0:8888"),
Expand All @@ -58,5 +59,6 @@ func main() {
} else {
klog.Infof("receive response %v", resp)
}
time.Sleep(time.Second * 10)
}
}
2 changes: 1 addition & 1 deletion example/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func main() {
if err != nil {
panic(err)
}
serviceName := "echo"
serviceName := "ServiceName"
svr := echo.NewServer(
new(EchoImpl),
server.WithServerBasicInfo(&rpcinfo.EndpointBasicInfo{ServiceName: serviceName}),
Expand Down

0 comments on commit 64a829d

Please sign in to comment.