Posts

Showing posts from November, 2022

More Go (Go lang learning series blog - 2)

Image
Learn more about Go! If you've followed and read my first blog of this Learning Go lang series, you can now print any text on your screen using Go lang. Again Congratulations! Today we'll learn more about Go lang and do a lot of cool stuffs! Go Variables :  In programming, a variable means a storage of some kind which can store different types of data. var number int The above line declares a variable of type int (Integer) which is named number.  Variables can have any names. But there are some rules : Rules for naming a variable A variable name can only have letters (both uppercase and lowercase letters), digits and underscore. The first letter of a variable should be either a letter or an underscore. There is no rule on how long a variable name (identifier) can be. However, you may run into problems in some compilers if the variable name is longer than 31 characters. The "var" keyword confirms that number is the name of that particular variable. The int keyword...

Get started with Go lang

Image
  What is Go? Go is also known as Go lang. It's an open source programming language developed by Google. It is a simple language which is statically typed. It is very popular for it's concurrency support via go routines & channels. Go Language has garbage collection which itself does the memory management and allows the deferred execution of functions. How to get started?  For Windows and MacOS :  Please head to following link to download and install go lang on your personal device.  Download Go   You'll see the interface like below for downloading. After downloading the package, just install it and to be sure that Go has successfully installed on your system, Run the below command in your powershell or terminal :  go version If you see the version correctly , then we are good to go. For Linux :  Linux have Go lang in their repositories. But still I would recommend the following version manager for installing and maintaining Go versions in your sys...