Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an document err #3759

Closed
samuelyao314 opened this issue Dec 5, 2023 · 1 comment
Closed

an document err #3759

samuelyao314 opened this issue Dec 5, 2023 · 1 comment

Comments

@samuelyao314
Copy link

Describe the bug

an error at documment: https://go-zero.dev/docs/tasks/grpc/client/quickstart

func main() {
    var clientConf zrpc.RpcClientConf
    conf.MustLoad("etc/client.yaml", &clientConf)
    conn := zrpc.MustNewClient(clientConf)
    resp, err := client.Ping(context.Background(), &greet.Request{})
    if err != nil {
        log.Fatal(err)
        return
    }

    log.Println(resp)
}

correct code

func main() {
    var clientConf zrpc.RpcClientConf
    conf.MustLoad("etc/client.yaml", &clientConf)
    conn := zrpc.MustNewClient(clientConf)
    client := greet.NewGreetClient(conn.Conn())
    resp, err := client.Ping(context.Background(), &greet.Request{})
    if err != nil {
        log.Fatal(err)
        return
    }

    log.Println(resp)
}

To Reproduce
Steps to reproduce the behavior, if applicable:

  1. The code is

  2. The error is

    
    

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environments (please complete the following information):

  • OS: [e.g. Linux]
  • go-zero version [e.g. 1.2.1]
  • goctl version [e.g. 1.2.1, optional]

More description
Add any other context about the problem here.

@samuelyao314 samuelyao314 changed the title has an err document in grpc client has an err document Dec 5, 2023
@samuelyao314 samuelyao314 changed the title has an err document an document err Dec 5, 2023
@kesonan
Copy link
Collaborator

kesonan commented Dec 5, 2023

Thanks for your contribution, we have already fix it.

@kesonan kesonan closed this as completed Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants