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

4.1.2 更安全的 RPC 接口 #618

Open
KongFanJin opened this issue Mar 7, 2023 · 0 comments
Open

4.1.2 更安全的 RPC 接口 #618

KongFanJin opened this issue Mar 7, 2023 · 0 comments
Assignees

Comments

@KongFanJin
Copy link

基于新的客户端接口,我们可以简化客户端用户的代码:

func main() {
    client, err := DialHelloService("tcp", "localhost:1234")
    if err != nil {
        log.Fatal("dialing:", err)
    }

    var reply string
    err = client.Hello("hello", &reply)
    if err != nil {
        log.Fatal(err)
    }

    fmt.Println(reply) // 缺少这个打印
}

缺少打印, 我看了半天, 怎么没输出呢....

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