<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ZammaCode</title>
    <description>The latest articles on DEV Community by ZammaCode (@zammacode).</description>
    <link>https://dev.to/zammacode</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F819667%2F4b496b25-bd2a-4286-8c8a-ff6bb9eedf71.jpg</url>
      <title>DEV Community: ZammaCode</title>
      <link>https://dev.to/zammacode</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zammacode"/>
    <language>en</language>
    <item>
      <title>Operators in GO</title>
      <dc:creator>ZammaCode</dc:creator>
      <pubDate>Mon, 21 Mar 2022 05:06:12 +0000</pubDate>
      <link>https://dev.to/zammacode/operators-in-go-32co</link>
      <guid>https://dev.to/zammacode/operators-in-go-32co</guid>
      <description>&lt;ul&gt;
&lt;li&gt;Operators are used to perform operations on variables and values.&lt;/li&gt;
&lt;li&gt;Operators allow operands to be combined into expressions&lt;/li&gt;
&lt;li&gt;Operators are either binary operators or unary operators. A binary operator operation takes two operands and a unary operator operation takes only one operand.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Arithmetic Operators
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go supports the following arithmetic operators.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tvu73qdn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ulra3zecwtzhhgd8qcc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tvu73qdn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ulra3zecwtzhhgd8qcc.png" alt="Image description" width="752" height="303"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To demonstrate the use of arithmetic operators; create new folder as 03-01 ArithmeticOperators in src folder of the workspace and create arithmetic_op.go file and type the following code.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Following is the output of above example.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X_emPXs5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/67hnt62xtzzm11vob77p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X_emPXs5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/67hnt62xtzzm11vob77p.png" alt="Image description" width="667" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Commit and push changes to GitHub.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;$ git add .&lt;br&gt;
   $ git commit -m "03-01 ArithmeticOperators"&lt;br&gt;
   $ git push origin master&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Assignment Operators
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Assignment operators are used to assign values to variables.&lt;/li&gt;
&lt;li&gt;Following is the list of assignment operators.
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XQnIBfoi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m1vkibmrpqshenzaljut.png" alt="Image description" width="752" height="348"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create 03-02 AssignmentOperators folder in src folder and add a file assignment_op.go and type the following example.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Following is the output of above example.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K3D6lx28--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pywukefvzi9e5mlyakc5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K3D6lx28--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pywukefvzi9e5mlyakc5.png" alt="Image description" width="658" height="169"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Commit changes to GitHub&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;$ git add .&lt;br&gt;
$ git commit -m "03-02 AssignmentOperators"&lt;br&gt;
$ git push origin master&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparison/Relational Operators
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Comparison operators are used to compare two values.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Following is the list of comparison operators.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OQIpOY2u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sw6wbstqxg9wau4rn3hn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OQIpOY2u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sw6wbstqxg9wau4rn3hn.png" alt="Image description" width="694" height="481"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The following example demonstrates the usage of comparison operators. Create folder 03-03 ComparisonOperators in src folder and file with the name comparison_op.go &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Following is the output.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zjV1x6LL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/odyxzhr6oh55hk3umyap.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zjV1x6LL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/odyxzhr6oh55hk3umyap.png" alt="Image description" width="687" height="173"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Commit changes to GitHub.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;$ git add .&lt;br&gt;
$ git commit -m "03-03 ComparisonOperators"&lt;br&gt;
$ git push origin master&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Logical Operators
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Logical operators are used for operations on Boolean values within the logical expressions.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Following is the list of logical operators supported by Go.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LcE5nHJj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qoqds1cb581s8ghj0gti.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LcE5nHJj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qoqds1cb581s8ghj0gti.png" alt="Image description" width="693" height="189"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Let’s create a folder 03-04 LogicalOperators in src folder of your workspace and then create file logical_op.go &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On execution the following output will be shown.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xlhJAMeX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4o63nygmjf2i16td11yl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xlhJAMeX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4o63nygmjf2i16td11yl.png" alt="Image description" width="705" height="138"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Commit changes to GitHub.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;$ git add .&lt;br&gt;
$ git commit -m "03-04 LogicalOperators"&lt;br&gt;
$ git push origin master&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Bitwise Operators
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Bitwise operators work on bits and perform bit-by-bit operation.&lt;/li&gt;
&lt;li&gt;Following is the list of bitwise operators supported by Go.
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TH6XNWJi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v29uhzqsiufoq1judhbm.png" alt="Image description" width="692" height="411"&gt;
&lt;/li&gt;
&lt;li&gt;To demonstrate the usage of bitwise operators create folder 03-05 BitwiseOperators and file bitwise_op.go
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Following is the output.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4xkS8s47--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ojhr414uti6h5ucijfo3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4xkS8s47--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ojhr414uti6h5ucijfo3.png" alt="Image description" width="613" height="229"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finally commit Changes to GitHub.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;$ git add .&lt;br&gt;
$ git commit -m "03-05 BitwiseOperators"&lt;br&gt;
$ git push origin master&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Operators Precedence
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Operator precedence determines the grouping of terms in an expression. &lt;/li&gt;
&lt;li&gt;This affects how an expression is evaluated.&lt;/li&gt;
&lt;li&gt;The following table lists Go's operator precedence level, starting with the highest. 
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T9iCnv0b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u3eyxhsvj5bztuxr8ptv.png" alt="Image description" width="520" height="210"&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>go</category>
      <category>googlecloud</category>
    </item>
    <item>
      <title>Variables, Constants and Built-in Data Types in Go</title>
      <dc:creator>ZammaCode</dc:creator>
      <pubDate>Wed, 16 Mar 2022 11:30:22 +0000</pubDate>
      <link>https://dev.to/zammacode/variables-constants-and-built-in-data-types-in-go-dhi</link>
      <guid>https://dev.to/zammacode/variables-constants-and-built-in-data-types-in-go-dhi</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Variables in GO&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Variable is the name given to a memory location to store a value of a specific type. &lt;/li&gt;
&lt;li&gt;In Go variables can be declared in two ways.&lt;/li&gt;
&lt;li&gt;Static data type declaration; using var keyword e.g. var varname  datatype&lt;/li&gt;
&lt;li&gt;Dynamic data type declaration; using := operator e.g. varname := value&lt;/li&gt;
&lt;li&gt;The var keyword declaration can be used both inside and outside of function.&lt;/li&gt;
&lt;li&gt;The := operator declaration cannot be used inside function.&lt;/li&gt;
&lt;li&gt;In variables declared with := operator, the type of the variable is inferred from the value.&lt;/li&gt;
&lt;li&gt;If a variable is not assigned any value, Go automatically initializes it with the Zero value of the variable's type.&lt;/li&gt;
&lt;li&gt;In Go variables are case sensitive.&lt;/li&gt;
&lt;li&gt;In Go variable names are written in camelCase.&lt;/li&gt;
&lt;li&gt;Multiple variable declarations can be grouped into a block for greater readability e.g. var (a datatype1 c datatype2)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Comments
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Comments are lines of text that are used to make code more readable.&lt;/li&gt;
&lt;li&gt;Comments are ignored by the compiler during the compilation.&lt;/li&gt;
&lt;li&gt;To write a single line comment; begin a new line in your code with two forward slashes //. &lt;/li&gt;
&lt;li&gt;To write a multi-line comment; enclose comments in /* …. */&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Built-in Data Types in GO
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Data type specifies the type and size of values variable will hold.&lt;/li&gt;
&lt;li&gt;Go has three built-in data types.&lt;/li&gt;
&lt;li&gt;Numeric&lt;/li&gt;
&lt;li&gt;String&lt;/li&gt;
&lt;li&gt;Boolean&lt;/li&gt;
&lt;li&gt;To get the data type of any variable we can use the TypeOf() function from reflect package.&lt;/li&gt;
&lt;li&gt;To demonstrates the variable declaration in Go; create new folder as 02-01 Variables in src folder of the workspace and create var.go file and type the following code.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Following is the output of above code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BOha2wUf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/48v6djp45v82mrk0dorf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BOha2wUf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/48v6djp45v82mrk0dorf.png" alt="Image description" width="561" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Finally commit changes to your repo and push to GitHub.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ABNw_uSi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/njzaj154tumj625xeara.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ABNw_uSi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/njzaj154tumj625xeara.png" alt="Image description" width="788" height="344"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tNBbM2GF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l8t4sggxp7ro6xxh7yfd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tNBbM2GF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l8t4sggxp7ro6xxh7yfd.png" alt="Image description" width="793" height="250"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Constants in GO
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Constants are variables whose values cannot be changed later.&lt;/li&gt;
&lt;li&gt;Constant variables are declared using const keyword instead of using var and its value must be assigned during declaration.&lt;/li&gt;
&lt;li&gt;Constant names are usually written in uppercase letters.&lt;/li&gt;
&lt;li&gt;Constants can be declared either as typed or untyped.&lt;/li&gt;
&lt;li&gt;To demonstrates the constants declaration in Go; create new folder as 02-02 Constants in src folder of the workspace and create constant.go file and type the following code.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Running the above code produce the following output.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cuSZ6yul--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m0ktg2o16nt80qn0dn0i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cuSZ6yul--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m0ktg2o16nt80qn0dn0i.png" alt="Image description" width="640" height="99"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Commit changes to GitHub.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Gi4YPUPx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a8fc1zfcj2zjwg6bd4wx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Gi4YPUPx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a8fc1zfcj2zjwg6bd4wx.png" alt="Image description" width="668" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Numeric Data Type
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Numeric types falls into whole numbers, decimal and complex numbers.&lt;/li&gt;
&lt;li&gt;Go offers support for five different sizes of signed and unsigned integers or whole numbers, named int, int8,  int16, int32, int64; and uint, uint8, uint16, uint32, and uint64.&lt;/li&gt;
&lt;li&gt;There are two types of decimal or float numbers i.e. float32 and float64.&lt;/li&gt;
&lt;li&gt;Go also supports representation of complex numbers by using complex64 and complex128
&lt;/li&gt;
&lt;li&gt;int32 and uint8 has also aliases namely rune and byte respectively. &lt;/li&gt;
&lt;li&gt;Rune and byte are used to distinguish character values integer values (byte represents ASCII characters while rune represents Unicode character).&lt;/li&gt;
&lt;li&gt;The sizes of int and uint are implementation specific.&lt;/li&gt;
&lt;li&gt;To demonstrates the numeric data types and its variable declaration; create new folder as 02-03 NumericVariables in src folder of the workspace and create numeric_variables.go and type the following code.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Following is the out of above mentioned code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jM7sjNpu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z23ly4jj8ukuudknwpju.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jM7sjNpu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z23ly4jj8ukuudknwpju.png" alt="Image description" width="751" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Push code to GitHub.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--klRNbDMa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2l2jk1v5n162947smmns.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--klRNbDMa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2l2jk1v5n162947smmns.png" alt="Image description" width="554" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  String Data Type
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Strings in Go are sequence of characters where each and every character is represented by one or more bytes using UTF-8 Encoding.&lt;/li&gt;
&lt;li&gt;Strings are sequence of bytes representing Unicode characters.&lt;/li&gt;
&lt;li&gt;String is a slice of bytes. Slice is just like an array having an index value and length, but the size of the slice is resized they are not in fixed-size just like an array.&lt;/li&gt;
&lt;li&gt;In Go single strings are surrounded by double quotation marks (“”) while multiline strings can be defined using the backtick marks (``).&lt;/li&gt;
&lt;li&gt;Strings are immutable which means once a string value is assigned to a variable, the value of that string is never changed.&lt;/li&gt;
&lt;li&gt;To demonstrates the string data types and its variables declaration; create new folder as 02-04 StringVariables in src folder of the workspace and create str_variables.go and type the following code. &lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FsS_wXoW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l1dpbmxs0263tpttjatb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FsS_wXoW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l1dpbmxs0263tpttjatb.png" alt="Image description" width="759" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Commit your code to GitHub. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nrSBpjAF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w2rae2u279rj5jnae2kr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nrSBpjAF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w2rae2u279rj5jnae2kr.png" alt="Image description" width="581" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Operations on String Variables
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Accessing String Characters&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;String is a slice of bytes.&lt;/li&gt;
&lt;li&gt;In slice index always starts at zero.&lt;/li&gt;
&lt;li&gt;To access a specific character we use the index of an array in square brackets&lt;/li&gt;
&lt;li&gt;Create str_operations.go in 02-05 StringOperations folder and type the following code and run.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pxtd3_r8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0934epthvwk168gp0wmq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pxtd3_r8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0934epthvwk168gp0wmq.png" alt="Image description" width="782" height="108"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Accessing Substring&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Split and SplitAfter methods of strings standard library returns the substring in the form of slices.&lt;/li&gt;
&lt;li&gt;Continue in the previous str_operations.go file, type and run the following code.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Output of the above code snippet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2N_RgnTm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/08wzyk9j80lxase5dnmu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2N_RgnTm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/08wzyk9j80lxase5dnmu.png" alt="Image description" width="462" height="139"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Strings are Immutable&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once a string is created it's not possible to change it.&lt;/li&gt;
&lt;li&gt;Continue in the previous str_operations.go file, type and run the following code.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;
 

&lt;ul&gt;
&lt;li&gt;On execution of the above code the following error will be raise by the compiler.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--c7ipdBWm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ftftw4mubwzmpormzml6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--c7ipdBWm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ftftw4mubwzmpormzml6.png" alt="Image description" width="747" height="112"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. String Concatenation&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To perform string concatenation we can use the + operator.&lt;/li&gt;
&lt;li&gt;Continue with the str_operations.go file, type and run the following code.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;5. String Comparison&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The == operator is used to compare two strings for equality.&lt;/li&gt;
&lt;li&gt;Continue with the str_operations.go file, type and run the following code.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;6. String Length&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The len function returns the number of bytes in string while the RuneCountInString function of utf8 package can be used to find length of string.&lt;/li&gt;
&lt;li&gt;Continue with the str_operations.go file, type and run the following code.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Following is the output.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QvPDVehW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p4xx4bi27af5ucpsiisw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QvPDVehW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p4xx4bi27af5ucpsiisw.png" alt="Image description" width="516" height="114"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open up Git Bash and Commit changes to GitHub.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KD3CFwm6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ff51vkhmmz9ooyj20nso.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KD3CFwm6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ff51vkhmmz9ooyj20nso.png" alt="Image description" width="826" height="194"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZASBxL2A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ak96uuihechymdwhv24j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZASBxL2A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ak96uuihechymdwhv24j.png" alt="Image description" width="826" height="248"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Boolean Data Type
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A bool type represents the set of Boolean truth values denoted by the pre declared constants true and false.&lt;/li&gt;
&lt;li&gt;The default value of a boolean data type is false.&lt;/li&gt;
&lt;li&gt;To demonstrates the boolean data type and its variables declaration; create new folder as 02-06 BooleanVariables in src folder of the workspace and create bool_variables.go and type the following code.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;On execution the above code will print the following output.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6xNkmKaG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9q19khb3slrz4hxas8yd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6xNkmKaG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9q19khb3slrz4hxas8yd.png" alt="Image description" width="775" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Commit changes to GitHub.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gvDoTARz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w4cahapxngcynl6mdpwt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gvDoTARz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w4cahapxngcynl6mdpwt.png" alt="Image description" width="772" height="184"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gwzELrvE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4vrgzed1u02s3kvvh05v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gwzELrvE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4vrgzed1u02s3kvvh05v.png" alt="Image description" width="781" height="226"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Typecasting in GO
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Typecasting is a way to convert the variable from one data type to another data type.&lt;/li&gt;
&lt;li&gt;There are two types of data conversions:&lt;/li&gt;
&lt;li&gt;Implicit or Automatic Type Conversions: In Implicit type conversion, compiler automatically converts one data type to another data type. Go language doesn’t support implicit type conversion.&lt;/li&gt;
&lt;li&gt;Explicit Type Conversions: In Explicit Type Conversion, user converts the data type of a variable to required data type. This type of conversion is also called typecasting because the user casts (changes) the data type of the variable.&lt;/li&gt;
&lt;li&gt;To convert a value from one data type to another use the following syntax newDataTypeVariable = T(oldDataTypeVariable). Where T is the new data type.&lt;/li&gt;
&lt;li&gt;To demonstrates the typecasting; create new folder as 02-07 TypeCasting in src folder of the workspace and create typecast.go and type the following code.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;
 

&lt;ul&gt;
&lt;li&gt;After execution the the value of f_var will be assigned to integer variable without any error.&lt;/li&gt;
&lt;li&gt;For completion commit changes to GitHub.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---YAV61UY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mn06i96d4i6gk5fw422k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---YAV61UY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mn06i96d4i6gk5fw422k.png" alt="Image description" width="818" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
    </item>
    <item>
      <title>Introduction to Go</title>
      <dc:creator>ZammaCode</dc:creator>
      <pubDate>Tue, 22 Feb 2022 05:10:46 +0000</pubDate>
      <link>https://dev.to/zammacode/introduction-to-go-4hjf</link>
      <guid>https://dev.to/zammacode/introduction-to-go-4hjf</guid>
      <description>&lt;ul&gt;
&lt;li&gt;Go is a systems-level programming language for large, distributed systems and highly-scalable network servers.&lt;/li&gt;
&lt;li&gt;Go was created at Google in 2007 by Robert Griesemer, Rob Pike, and Ken Thomson.&lt;/li&gt;
&lt;li&gt;Go combines the safety and performance of statically-typed compiled language (e.g. C++, C#, Java) with expressiveness and convenience of dynamically-types interpreted language (e.g. Perl, Python, JavaScript).&lt;/li&gt;
&lt;li&gt;Go can be used for server-side web development, network-based applications, cloud-native development.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1ueKtI-b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/73ium4b17ucmf98z6huk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1ueKtI-b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/73ium4b17ucmf98z6huk.png" alt="Robert Griesemer, Rob Pike, and Ken Thompson" width="617" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation of Go on Windows
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Visit &lt;a href="https://go.dev/and"&gt;https://go.dev/and&lt;/a&gt; download the latest version.&lt;/li&gt;
&lt;li&gt;Installation is a simple wizard-based process.&lt;/li&gt;
&lt;li&gt;You may choose the installation folder.&lt;/li&gt;
&lt;li&gt;After successful installation, you can check the Go installation by opening a command prompt and type go -version&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YNMtryhv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zzpsypwak09w40znf43e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YNMtryhv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zzpsypwak09w40znf43e.png" alt="Image description" width="571" height="148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Go installer creates a GOPATH environment variable and by default set it to C:\Users\USER_NAME\go.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R2ZwIfUC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v7hjbrphhxzaeksgxtrx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R2ZwIfUC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v7hjbrphhxzaeksgxtrx.png" alt="Image description" width="575" height="99"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GOPATH points to Go Workspaces. &lt;/li&gt;
&lt;li&gt;Go workspace is hierarchy of folders to manage source files, compiled binaries and cached objects for faster compilation.&lt;/li&gt;
&lt;li&gt;There are three directories inside the workspace.&lt;/li&gt;
&lt;li&gt;bin: location of compiled executable programs built by Go &lt;/li&gt;
&lt;li&gt;pkg: location of compiled package code&lt;/li&gt;
&lt;li&gt;src: location of Go source code&lt;/li&gt;
&lt;li&gt;For practice purpose lets create a workspace for Go applications e.g. Practice.&lt;/li&gt;
&lt;li&gt;To tell Go about our new workspace set GOPATH to Practice folder. Right click My Computer and select Properties. On properties screen select Advanced System Settings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eYy6H3Hj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l6hpvsqpfz62n0tichc5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eYy6H3Hj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l6hpvsqpfz62n0tichc5.png" alt="Image description" width="341" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On System properties window click Environment Variables.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LuCLEkMd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uzeou9eu77stdct6hfcj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LuCLEkMd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uzeou9eu77stdct6hfcj.png" alt="Image description" width="440" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In next dialog select GOPATH and click Edit button.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NQBtwIJN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d112qq0vr38kcncfj4g7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NQBtwIJN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d112qq0vr38kcncfj4g7.png" alt="Image description" width="658" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Replace variable value with path of your workspace (E:\Edu\Go\Practice) and click Ok. Close variables dialog and then System properties dialog. To verify that new value is assigned to GOPATH;  run the following command from Command prompt.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TKvnJkos--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9jc0v4j3h974itx0lel2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TKvnJkos--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9jc0v4j3h974itx0lel2.png" alt="Image description" width="498" height="185"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation of Visual Studio Code on Windows
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Visual Studio Code is an editor which you can use for writing Go programs.&lt;/li&gt;
&lt;li&gt;To download Visual Studio Code visit the website &lt;a href="https://code.visualstudio.com/Download"&gt;https://code.visualstudio.com/Download&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Once the download is complete, run the exe to install Visual Studio Code.&lt;/li&gt;
&lt;li&gt;On the Select Addition Tasks dialog check all the available options and click next.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cEwq34Y0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ew5vqs6sudp38fbz2e1n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cEwq34Y0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ew5vqs6sudp38fbz2e1n.png" alt="Image description" width="864" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On next dialog click install button and wait for the installation to finish.&lt;/li&gt;
&lt;li&gt;Launch Visual Studio Code and bring up the Extensions view by clicking on the Extensions icon in the Activity Bar or use shortcut (Ctrl+Shift+X).&lt;/li&gt;
&lt;li&gt;Search and install the Go extension.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WDa1iPjy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ao8o1uehm903al1dnqd1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WDa1iPjy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ao8o1uehm903al1dnqd1.png" alt="Image description" width="773" height="229"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In Visual Studio Code, open Command Palette's from Help &amp;gt; Show All Commands or use shortcut (Ctrl+Shift+P) and update Go tools by typing Go: Install/Update tools and checking all the tools shown. Wait for the Go tools to finish updating. VS Code Go will install the tools to your GOPATH/bin by default.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fa4VZGuf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/669s6alcaakogllvd6cm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fa4VZGuf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/669s6alcaakogllvd6cm.png" alt="Image description" width="809" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--P9FQiMwH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0g5xh3pyq10m04yod1e2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P9FQiMwH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0g5xh3pyq10m04yod1e2.png" alt="Image description" width="450" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Hello World Go Program
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;To open Practice folder (workspace created earlier) in Visual Studio click Open Folder from File menu and select Practice directory. &lt;/li&gt;
&lt;li&gt;Right click Practice folder and create src folder. In src folder create HelloWorld directory for our hello world app.&lt;/li&gt;
&lt;li&gt;In HelloWorld directory create a main.go file and type a simple program to print hello world. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bxpHAJuB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bn6qk5x7be36p3qxkjnx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bxpHAJuB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bn6qk5x7be36p3qxkjnx.png" alt="Image description" width="564" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The package keyword declares the package with the name “main”. Package is the collection of source files in the same directory that are compiled together. There are two types of Go programs; executables and libraries. An executable package requires to be created with package name main and main function declaration.&lt;/p&gt;

&lt;p&gt;The import statement includes a package into our program. The fmt package (shorthand for format) implements formatting for input and output. &lt;/p&gt;

&lt;p&gt;All functions start with func keyword. The main function is special because it gets called when program is executed. The Println function of fmt package prints the string to the standard output (output of terminal).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;At very first line we are faced with error “go.mod file not found in current directory or any parent directory; see 'go help modules'”. &lt;/li&gt;
&lt;li&gt;Go.mod file specifies a module name, dependencies, and minimal versions. The go mod init command initializes and writes a new go.mod file in the current directory and also creates pkg folder in our workspace.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bnCzQ61f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r6r9h74s5o3px2m79i3w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bnCzQ61f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r6r9h74s5o3px2m79i3w.png" alt="Image description" width="532" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There are three ways to run Go program.&lt;/li&gt;
&lt;li&gt;go run command compiles the code into a binary file, places it in a temporary directory, executes this binary file, and deletes it after your program finishes.&lt;/li&gt;
&lt;li&gt;go build command compiles the code into a binary file and places it in the current directory without executing it.&lt;/li&gt;
&lt;li&gt;go install command compiles the code into a binary file, creates GOPATH /bin directory and places exe in it without executing it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---ufHUAkG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fmk9960b5lvqhfjr6vhz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---ufHUAkG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fmk9960b5lvqhfjr6vhz.png" alt="Image description" width="546" height="125"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XA6uh7F8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/75nnwwikjnk3ua02n0vm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XA6uh7F8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/75nnwwikjnk3ua02n0vm.png" alt="Image description" width="569" height="91"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XOWA5b3N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t3xo321nsamlpu3x4m8a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XOWA5b3N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t3xo321nsamlpu3x4m8a.png" alt="Image description" width="594" height="97"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
    </item>
  </channel>
</rss>
