From the course: Beginner's Guide to Go Protocol Buffer
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Solution 2: Part 3 - Go Tutorial
From the course: Beginner's Guide to Go Protocol Buffer
Solution 2: Part 3
- [Instructor] But now, we also need to instantiate the client. So we have initialized. We're going to add function, initialize character client, and we're going to return the client. So in order to do that, we're going to define the options or the GRPC dialing. So dial options, we're not going to actually have any, we're just going to use whatever the default is. So ops, we're going to append so we can get the transport with no credentials, and they're going to be insecure. And once we get that, let's just print out that. Going to be starting, we're going to be dialing character service GRPC, at local host 9008. I'm going to try to get the connection when we dial it. So we have a GRPC, local host eight, and then the options. And then if there is an error, it will be a fatal one. So we have log.fatal. Oops, we need to put a string there. Fail to dial. Now we need to know what the error is. Then after that we're…