From f07bbd53a4d31175eacbbfe54713aaf1dd35b3c8 Mon Sep 17 00:00:00 2001 From: Viola_Pioggia <114391708+ViolaPioggia@users.noreply.github.com> Date: Thu, 23 Nov 2023 23:05:51 +0800 Subject: [PATCH] docs:optimize readme (#4) --- README.md | 9 +++------ README_CN.md | 9 +++------ example/client/main.go | 6 ++---- example/server/main.go | 2 +- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 4e6a07c..7f6e262 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,7 @@ func (s *EchoImpl) Echo(ctx context.Context, req *api.Request) (resp *api.Respon } func main() { - klog.SetLevel(klog.LevelDebug) - serviceName := "ServiceName" + serviceName := "ServiceName"// your server-side service name etcdClient, err := etcd.NewClient(etcd.Options{}) if err!=nil { panic(err) @@ -87,8 +86,6 @@ func (cl *configLog) Apply(opt *utils.Options) { } func main() { - klog.SetLevel(klog.LevelDebug) - etcdClient, err := etcd.NewClient(etcd.Options{}) if err != nil { panic(err) @@ -96,8 +93,8 @@ func main() { cl := &configLog{} - serviceName := "ServiceName" - clientName := "ClientName" + serviceName := "ServiceName"// your server-side service name + clientName := "ClientName"// your client-side service name client, err := echo.NewClient( serviceName, client.WithHostPorts("0.0.0.0:8888"), diff --git a/README_CN.md b/README_CN.md index 328bf1e..6d34cd7 100644 --- a/README_CN.md +++ b/README_CN.md @@ -38,8 +38,7 @@ func (s *EchoImpl) Echo(ctx context.Context, req *api.Request) (resp *api.Respon } func main() { - klog.SetLevel(klog.LevelDebug) - serviceName := "ServiceName" + serviceName := "ServiceName"// your server-side service name etcdClient, err := etcd.NewClient(etcd.Options{}) if err!=nil { panic(err) @@ -87,8 +86,6 @@ func (cl *configLog) Apply(opt *utils.Options) { } func main() { - klog.SetLevel(klog.LevelDebug) - etcdClient, err := etcd.NewClient(etcd.Options{}) if err != nil { panic(err) @@ -96,8 +93,8 @@ func main() { cl := &configLog{} - serviceName := "ServiceName" - clientName := "ClientName" + serviceName := "ServiceName"// your server-side service name + clientName := "ClientName"// your client-side service name client, err := echo.NewClient( serviceName, client.WithHostPorts("0.0.0.0:8888"), diff --git a/example/client/main.go b/example/client/main.go index e311074..58da79e 100644 --- a/example/client/main.go +++ b/example/client/main.go @@ -38,8 +38,6 @@ func (cl *configLog) Apply(opt *utils.Options) { } func main() { - klog.SetLevel(klog.LevelDebug) - etcdClient, err := etcd.NewClient(etcd.Options{}) if err != nil { panic(err) @@ -47,8 +45,8 @@ func main() { cl := &configLog{} - serviceName := "ServiceName" - clientName := "ClientName" + serviceName := "ServiceName" // your server-side service name + clientName := "ClientName" // your client-side service name client, err := echo.NewClient( serviceName, client.WithHostPorts("0.0.0.0:8888"), diff --git a/example/server/main.go b/example/server/main.go index 42e98b4..cf29625 100644 --- a/example/server/main.go +++ b/example/server/main.go @@ -39,7 +39,7 @@ func (s *EchoImpl) Echo(ctx context.Context, req *api.Request) (resp *api.Respon func main() { klog.SetLevel(klog.LevelDebug) - serviceName := "ServiceName" + serviceName := "ServiceName" // your server-side service name etcdClient, _ := etcd.NewClient(etcd.Options{}) svr := echo.NewServer( new(EchoImpl),