<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>server on Golang</title><link>https://golang.k5kc.com/tags/server/</link><description>Recent content in server on Golang</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 17 Aug 2020 00:16:00 +0530</lastBuildDate><atom:link href="https://golang.k5kc.com/tags/server/index.xml" rel="self" type="application/rss+xml"/><item><title>Defining gRPC service</title><link>https://golang.k5kc.com/2020/08/17/8.generating-client-server-code/</link><pubDate>Mon, 17 Aug 2020 00:16:00 +0530</pubDate><guid>https://golang.k5kc.com/2020/08/17/8.generating-client-server-code/</guid><description>Next we need to generate the gRPC client and server interfaces from our .proto service definition. We do this using the protocol buffer compiler protoc with a special gRPC Go plugin.
For simplicity, we&amp;rsquo;ve provided a bash script that runs protoc for you with the appropriate plugin, input, and output (if you want to run this by yourself, make sure you&amp;rsquo;ve installed protoc and followed the gRPC-Go installation instructions first):</description></item><item><title>Building a gRPC Server in Go</title><link>https://golang.k5kc.com/2020/08/16/9.building-grpc-server/</link><pubDate>Sun, 16 Aug 2020 00:18:00 +0530</pubDate><guid>https://golang.k5kc.com/2020/08/16/9.building-grpc-server/</guid><description>Let’s start off by defining a really simple gRPC server in Go. Once we have a simple server up and running we can set about creating a gRPC client that will be able to interact with it.
We will start off by writing the logic within our main function to listen on a port for incoming TCP connections:
main.go
package main import ( &amp;#34;log&amp;#34; &amp;#34;net&amp;#34; ) func main() { lis, err := net.</description></item><item><title>Cobra - Create CLI in Go</title><link>https://golang.k5kc.com/2020/08/16/1.setup-cobra/</link><pubDate>Sun, 16 Aug 2020 00:17:00 +0530</pubDate><guid>https://golang.k5kc.com/2020/08/16/1.setup-cobra/</guid><description>Golang for CLI Go is the perfect language to develop command line applications. Go has a few advantages that really set it apart from other languages:
Single binary Very fast execution time, no interpreter needed Go is awesome! Cross platform support Command line based applications are nearly as old as computing itself but this doesn’t mean that they haven’t evolved. Traditional cli applications used flags to manage the different behaviors an application could perform.</description></item></channel></rss>