<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ashutosh Rai on Medium]]></title>
        <description><![CDATA[Stories by Ashutosh Rai on Medium]]></description>
        <link>https://medium.com/@dev.ashurai?source=rss-bca575782da6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*14elqRUrV2fxb3F3cG-bhA.jpeg</url>
            <title>Stories by Ashutosh Rai on Medium</title>
            <link>https://medium.com/@dev.ashurai?source=rss-bca575782da6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 20:15:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dev.ashurai/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How and From where to start Go / GoLang]]></title>
            <link>https://medium.com/@dev.ashurai/how-and-from-where-to-start-go-golang-4490e8d83568?source=rss-bca575782da6------2</link>
            <guid isPermaLink="false">https://medium.com/p/4490e8d83568</guid>
            <dc:creator><![CDATA[Ashutosh Rai]]></dc:creator>
            <pubDate>Thu, 13 Feb 2020 10:06:40 GMT</pubDate>
            <atom:updated>2020-10-12T06:52:16.719Z</atom:updated>
            <content:encoded><![CDATA[<p>With a new team I recognized that we need to take care few things from the beginning as a learning part of go and a new language</p><h4>Where to perform regular test / experiments for small programs</h4><p>Practice is must if we want any new skill in our arsenal and as much we do practices , that make it lot easier to perform with a better command, this is a very common lesson which we are learning from our childhood so i will stop on this and move to the playground which is a best tool to practice without any effort, here is your tool best tool to start 👉 <a href="https://play.golang.org/">https://play.golang.org/</a>. <em>if you want to keep references of all your code you can generate a share link on playground and store it in any drive.</em></p><p>First list of things those need to be read by team before starting a project, I am giving a reference from web which is<a href="https://yourbasic.org/golang/#step-by-step-guides"> 👉here</a></p><h4># Why and how Go Functions are first class citizens</h4><p><em>Here is some golang playground example to hwy Go functions are first class citizens </em>👉<em> </em><a href="https://play.golang.org/p/Dc_l5CQQbIF"><em>https://play.golang.org/p/Dc_l5CQQbIF</em></a></p><h4>How we can handle callbacks in Go</h4><p>a simple sum of int type slice (type []int) using variadic function 👉 <a href="https://play.golang.org/p/sBxDdUXdLjJ">https://play.golang.org/p/sBxDdUXdLjJ</a> , here i am adding a callback function to add sum of all even no 👉 <a href="https://play.golang.org/p/Drwi6PLiYaE">https://play.golang.org/p/Drwi6PLiYaE</a>, for more and better understanding i am adding here one example with odd and even no 👉<a href="https://play.golang.org/p/qDxWVI76Ok1">https://play.golang.org/p/qDxWVI76Ok1</a></p><h4>What are the scope / closure in Go</h4><p>Closer or scope is a way to restrict your variable, it could be either limited to a function / method / package. In Go only one way to export variables from one package to another and that is an exported type of Variable / method, and to implement this we need to start writing our variable / method with upper case EX:(MyFunction(), MyVariable). Here an example which is just limited to one package main but will give you clarity by exported and non exported variables 👉 <a href="https://play.golang.org/p/d-Do1DYRzP0">https://play.golang.org/p/d-Do1DYRzP0</a>. Note:- go through comments they are helpful to understand.</p><h4>Interfaces implementation with Go</h4><p>Here is the example 👉<a href="https://play.golang.org/p/uApNiVIL-Ij">https://play.golang.org/p/uApNiVIL-Ij</a></p><h4>A basic sort example using sort function in go and simple interface implementation of interface at package level</h4><p><a href="https://play.golang.org/p/QY9V6chZhN8">https://play.golang.org/p/QY9V6chZhN8</a></p><p>here more have to come, will be adding more contents from learning on go and learning with a freshers team go</p><p>Example of common math basic problems with golang:</p><p><strong>Solution to get LCM of two no: </strong><a href="https://play.golang.org/p/qlKW0wQF2i9"><strong>https://play.golang.org/p/qlKW0wQF2i9</strong></a></p><p>An example of slice pointer: <a href="https://play.golang.org/p/14aCN0mU_Uk">https://play.golang.org/p/14aCN0mU_Uk</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4490e8d83568" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Protoc / Protobuf Installation on Windows / Linux / Mac]]></title>
            <link>https://medium.com/@dev.ashurai/protoc-protobuf-installation-on-windows-linux-mac-d70d5380489d?source=rss-bca575782da6------2</link>
            <guid isPermaLink="false">https://medium.com/p/d70d5380489d</guid>
            <category><![CDATA[portobuf]]></category>
            <category><![CDATA[protoc]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Ashutosh Rai]]></dc:creator>
            <pubDate>Tue, 22 Jan 2019 07:40:16 GMT</pubDate>
            <atom:updated>2020-04-16T12:00:35.926Z</atom:updated>
            <content:encoded><![CDATA[<h3>Protoc / Protobuf Installation on Windows</h3><h4>Required to generate make file</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*ouqfUXXZZxvEFLZjWm468g.png" /></figure><p>To work with GoLang micro services i was installing protobuf which is a library to create make files, to implement GRPC in use, but there was several challenges when i started installation over windows 10. Will add for Linux and Mac later , but they are very easy to install on both machine’s by console.</p><p>At the end finally i found a solution that was very simple , easy and relevant to finish the installation within few steps. First of all don’t get confused with so many documentation from the github protobuf installation page, this is good to know the details but if you just started then it’s not for you because it’s time taking and will create lot’s of confusion that could be also a hurdle in implementing GRPC stuff at beginning level.</p><p>It’s a very good stuff to use a RPC service to interchanging data internally between multiple services in binary , that give us a boost and reason to use micro services very smoothly .</p><p>Now here is the steps to install on windows , Linux / Mac</p><p><strong>|Prerequisite: </strong>Check you have a working visual studio code with c++ on your local windows system, because this will make your installation more easier.</p><p>To the windows users:</p><p>you can clone this anywhere on your local system , but i will recommend you to put this inside of C:/ , will make easier in accessing and execution to commands.</p><blockquote>first of all clone below vcpkg library to install rest of the dependencies:</blockquote><blockquote>`git clone <a href="https://github.com/Microsoft/vcpkg.git">https://github.com/Microsoft/vcpkg.git</a>`</blockquote><p>after cloning this repository go to the vcpkg directory</p><blockquote>`cd vcpkg`</blockquote><p>After that if you want to test all the commands then use</p><blockquote>`vcpkg help`</blockquote><p>Later that you can see all the available commands , but you have to run the below bootstrapper command to boot this installation :</p><blockquote>`.\bootstrap-vcpkg.bat `</blockquote><p>After executing this command you should integrate this vcpkg with you system config to execute globally, so that execute the below command:</p><blockquote>`.\vcpkg integrate install `</blockquote><p>now we can install protoc / protobuf to generate make files, so that we need to execute below command , one more thing to take care, if you know the exact windows os version then use below command</p><blockquote>`vcpkg install protobuf protobuf:x64-windows `</blockquote><p>if you have any confusion then only execute below command , personally i also recommend to execute this because that will handle all the default requirements as per your local machine.</p><blockquote>`vcpkg install protobuf `</blockquote><p>To test the instillation on your local system , you need to run this command:</p><blockquote>`vcpkg list `</blockquote><p>output should look like this something , could be little different on your system:</p><blockquote>`protobuf:x86-windows 3.6.1.3–1 Protocol Buffers — Google’s data interchange format`</blockquote><p>Hope you are able to achieve the job successfully.</p><p>if any suggestion then write in comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d70d5380489d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>