<?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>Forem: Bharat Makwana</title>
    <description>The latest articles on Forem by Bharat Makwana (@bharatmk256).</description>
    <link>https://forem.com/bharatmk256</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%2F189467%2F786ac91b-7be2-47eb-8cd7-dfb393d6c26c.jpg</url>
      <title>Forem: Bharat Makwana</title>
      <link>https://forem.com/bharatmk256</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/bharatmk256"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>Bharat Makwana</dc:creator>
      <pubDate>Wed, 25 Jun 2025 09:12:26 +0000</pubDate>
      <link>https://forem.com/bharatmk256/-35b5</link>
      <guid>https://forem.com/bharatmk256/-35b5</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/aurelievache/understanding-docker-part-1-retrieve-pull-images-3ccn" class="crayons-story__hidden-navigation-link"&gt;Understanding Docker: part 1 – Retrieve &amp;amp; Pull images&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/aurelievache" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F9688%2Fg2T2qehD.jpg" alt="aurelievache profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/aurelievache" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Aurélie Vache
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Aurélie Vache
                
              
              &lt;div id="story-author-preview-content-391879" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/aurelievache" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F9688%2Fg2T2qehD.jpg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Aurélie Vache&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/aurelievache/understanding-docker-part-1-retrieve-pull-images-3ccn" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Aug 3 '20&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/aurelievache/understanding-docker-part-1-retrieve-pull-images-3ccn" id="article-link-391879"&gt;
          Understanding Docker: part 1 – Retrieve &amp;amp; Pull images
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/docker"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;docker&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/devops"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;devops&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/beginners"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;beginners&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/cloud"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;cloud&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/aurelievache/understanding-docker-part-1-retrieve-pull-images-3ccn" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/fire-f60e7a582391810302117f987b22a8ef04a2fe0df7e3258a5f49332df1cec71e.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;415&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/aurelievache/understanding-docker-part-1-retrieve-pull-images-3ccn#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              4&lt;span class="hidden s:inline"&gt; comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            1 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>docker</category>
      <category>devops</category>
      <category>beginners</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Introduction to Golang: A Comprehensive Guide for Beginners</title>
      <dc:creator>Bharat Makwana</dc:creator>
      <pubDate>Wed, 16 Apr 2025 11:54:37 +0000</pubDate>
      <link>https://forem.com/bharatmk256/introduction-to-golang-a-comprehensive-guide-for-beginners-ijj</link>
      <guid>https://forem.com/bharatmk256/introduction-to-golang-a-comprehensive-guide-for-beginners-ijj</guid>
      <description>&lt;h2&gt;
  
  
  What is Go?
&lt;/h2&gt;

&lt;p&gt;Go, also known as Golang, is a powerful programming language developed at Google by Robert Griesemer, Rob Pike, and Ken Thompson. As a statically typed and compiled language, it combines performance with type safety. Go is celebrated for its simplicity, readability, and efficiency, featuring fast compilation and execution. Its built-in concurrency model, robust standard library, and garbage collection make it a favorite for modern software development.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Characteristics
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Simplicity &amp;amp; Readability&lt;/strong&gt;: Minimal syntax for easy comprehension.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Efficiency&lt;/strong&gt;: Fast compilation and execution speeds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built-in Concurrency&lt;/strong&gt;: Simplifies parallel task management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strong Standard Library&lt;/strong&gt;: Comprehensive tools for diverse applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Garbage Collected&lt;/strong&gt;: Automatic memory management.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Learn Go?
&lt;/h2&gt;

&lt;p&gt;Go’s clean and minimal syntax makes it approachable for beginners, while its high performance suits it for systems programming, web backends, and more. Its concurrency model, powered by goroutines and channels, simplifies complex tasks. Go’s growing ecosystem powers cloud-native technologies like Docker and Kubernetes, command-line tools, and microservices. Fast compile times and excellent tooling boost developer productivity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of Learning Go
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Easy to Learn&lt;/strong&gt;: Intuitive syntax reduces the learning curve.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High Performance&lt;/strong&gt;: Ideal for performance-critical applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Concurrency Support&lt;/strong&gt;: Goroutines and channels streamline concurrent programming.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Growing Ecosystem&lt;/strong&gt;: Widely used in modern tech stacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Productivity&lt;/strong&gt;: Rapid compilation and robust tools.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Setting Up Your Go Environment
&lt;/h2&gt;

&lt;p&gt;Getting started with Go is straightforward:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Download Go&lt;/strong&gt;: Visit &lt;a href="https://go.dev/dl/" rel="noopener noreferrer"&gt;https://go.dev/dl/&lt;/a&gt; to download the installer for your operating system (Windows, macOS, or Linux).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Install&lt;/strong&gt;: Follow the OS-specific installation instructions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify Installation&lt;/strong&gt;: Open a terminal and run &lt;code&gt;go version&lt;/code&gt; to confirm Go is installed correctly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workspace (Optional)&lt;/strong&gt;: Understand the &lt;code&gt;$HOME/go&lt;/code&gt; structure (&lt;code&gt;src&lt;/code&gt;, &lt;code&gt;pkg&lt;/code&gt;, &lt;code&gt;bin&lt;/code&gt;). Note that Go Modules are now the standard for dependency management.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Your First Go Program: "Hello, World!"
&lt;/h2&gt;

&lt;p&gt;Let’s write a simple Go program to print "Hello, Bootcamp!" to the console:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt; &lt;span class="c"&gt;// Executable program package&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s"&gt;"fmt"&lt;/span&gt; &lt;span class="c"&gt;// Import standard Formatted I/O library&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c"&gt;// Entry point of the program&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello, Bootcamp!"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// Print to console&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Run the Program&lt;/strong&gt;: Save this as &lt;code&gt;hello.go&lt;/code&gt; and run &lt;code&gt;go run hello.go&lt;/code&gt; in your terminal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key Components&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;package main&lt;/code&gt;: Defines an executable program.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;import "fmt"&lt;/code&gt;: Imports the formatted I/O library.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;func main()&lt;/code&gt;: The program’s entry point.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Basic Syntax
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Packages &amp;amp; Variables
&lt;/h3&gt;

&lt;p&gt;Go organizes code into packages. The &lt;code&gt;main&lt;/code&gt; package creates executable programs, while other packages (e.g., &lt;code&gt;package mylib&lt;/code&gt;) organize reusable code. Use &lt;code&gt;import&lt;/code&gt; to include external packages like &lt;code&gt;fmt&lt;/code&gt; or &lt;code&gt;math&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Variables are declared using &lt;code&gt;var&lt;/code&gt; or the short declaration operator &lt;code&gt;:=&lt;/code&gt; (inside functions only):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;30&lt;/span&gt;
&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="c"&gt;// Defaults to ""&lt;/span&gt;
&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="c"&gt;// Defaults to 0&lt;/span&gt;
&lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="s"&gt;"Hello"&lt;/span&gt; &lt;span class="c"&gt;// Inferred string&lt;/span&gt;
&lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="m"&gt;95&lt;/span&gt; &lt;span class="c"&gt;// Inferred int&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Constants &amp;amp; Basic Types
&lt;/h3&gt;

&lt;p&gt;Constants are immutable values defined with &lt;code&gt;const&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="n"&gt;Pi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;3.14159&lt;/span&gt;
&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="n"&gt;AppName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"BootcampApp"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Go supports basic data types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Integers: &lt;code&gt;int&lt;/code&gt;, &lt;code&gt;int64&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Floating-point: &lt;code&gt;float32&lt;/code&gt;, &lt;code&gt;float64&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Boolean: &lt;code&gt;bool&lt;/code&gt; (&lt;code&gt;true&lt;/code&gt;, &lt;code&gt;false&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;String: &lt;code&gt;string&lt;/code&gt; (immutable UTF-8 text)&lt;/li&gt;
&lt;li&gt;Byte: &lt;code&gt;byte&lt;/code&gt; (alias for &lt;code&gt;uint8&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Control Flow: if/else
&lt;/h3&gt;

&lt;p&gt;Go’s &lt;code&gt;if/else&lt;/code&gt; statements require braces &lt;code&gt;{}&lt;/code&gt; but omit parentheses around conditions. An optional initialization statement can precede the condition:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="m"&gt;60&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Passed"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Failed"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;getValue&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Negative"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Control Flow: for Loop
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;for&lt;/code&gt; loop is Go’s only looping construct, supporting multiple styles:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;C-style&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;   &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="c"&gt;// ...&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Condition-only (while-like)&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;   &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="c"&gt;// ...&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Infinite&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;   &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="c"&gt;// ... (use break to exit)&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;For-range (collections)&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;   &lt;span class="n"&gt;items&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;"a"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"c"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
   &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="k"&gt;range&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="c"&gt;// ...&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
   &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="k"&gt;range&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c"&gt;// Ignore index&lt;/span&gt;
       &lt;span class="c"&gt;// ...&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Control Flow: switch
&lt;/h3&gt;

&lt;p&gt;Go’s &lt;code&gt;switch&lt;/code&gt; statement is a cleaner alternative to multiple &lt;code&gt;if/else&lt;/code&gt; statements. It doesn’t fall through by default and supports multiple case values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;switch&lt;/span&gt; &lt;span class="n"&gt;day&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="s"&gt;"Saturday"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Sunday"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Weekend"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Weekday"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;switch&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c"&gt;// Expressionless switch&lt;/span&gt;
&lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;hour&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="m"&gt;12&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Morning"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Afternoon/Evening"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Composite Types
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Arrays
&lt;/h3&gt;

&lt;p&gt;Arrays are fixed-size sequences of elements of the same type. Their size is part of the type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="c"&gt;// Array of 5 zeros&lt;/span&gt;
&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;100&lt;/span&gt;
&lt;span class="n"&gt;primes&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c"&gt;// Array literal&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Slices
&lt;/h3&gt;

&lt;p&gt;Slices are dynamic, flexible views of arrays and are more commonly used. They support &lt;code&gt;len()&lt;/code&gt;, &lt;code&gt;cap()&lt;/code&gt;, and &lt;code&gt;append()&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;letters&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;"a"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"c"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c"&gt;// Slice literal&lt;/span&gt;
&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;make&lt;/span&gt;&lt;span class="p"&gt;([]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// make(type, length, capacity)&lt;/span&gt;
&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;sub&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;letters&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c"&gt;// Slicing: ["b", "c"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Maps
&lt;/h3&gt;

&lt;p&gt;Maps store unordered key-value pairs, created with &lt;code&gt;make()&lt;/code&gt; or literals:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;ages&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;make&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;map&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ages&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"Bob"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;25&lt;/span&gt;
&lt;span class="n"&gt;scores&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="k"&gt;map&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;"Math"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;95&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;val&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ok&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;ages&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"Alice"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c"&gt;// Check existence&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;ok&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nb"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Bob"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// Remove key&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="k"&gt;range&lt;/span&gt; &lt;span class="n"&gt;ages&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c"&gt;// Iterate&lt;/span&gt;
    &lt;span class="c"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Structs
&lt;/h3&gt;

&lt;p&gt;Structs group related fields to define custom data types:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;Person&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;FirstName&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;
    &lt;span class="n"&gt;LastName&lt;/span&gt;  &lt;span class="kt"&gt;string&lt;/span&gt;
    &lt;span class="n"&gt;Age&lt;/span&gt;       &lt;span class="kt"&gt;int&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;p1&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;FirstName&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Ada"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;LastName&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Lovelace"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Age&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;36&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;FirstName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// Output: Ada&lt;/span&gt;
    &lt;span class="n"&gt;p2&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;FirstName&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Alan"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c"&gt;// Pointer to struct&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;FirstName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// Auto-dereferenced&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Functions
&lt;/h2&gt;

&lt;p&gt;Functions in Go support parameters, return types, multiple return values, and variadic arguments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;divide&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="kt"&gt;float64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;float64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;errors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;New&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"division by zero"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;sumAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c"&gt;// Variadic&lt;/span&gt;
    &lt;span class="c"&gt;// nums is a slice&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Pointers
&lt;/h2&gt;

&lt;p&gt;Pointers store memory addresses, using &lt;code&gt;&amp;amp;&lt;/code&gt; to get an address and &lt;code&gt;*&lt;/code&gt; to dereference:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;
&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="c"&gt;// p holds address of x&lt;/span&gt;
&lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// Output: 10&lt;/span&gt;
&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;20&lt;/span&gt; &lt;span class="c"&gt;// Changes x&lt;/span&gt;
&lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// Output: 20&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pointers are useful for modifying function arguments or passing large structs efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Methods
&lt;/h2&gt;

&lt;p&gt;Methods are functions tied to a specific type (the receiver). Value receivers operate on copies, while pointer receivers modify the original:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;Rect&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="kt"&gt;float64&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="n"&gt;Rect&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;Area&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="kt"&gt;float64&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c"&gt;// Value receiver&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;Rect&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;Scale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;factor&lt;/span&gt; &lt;span class="kt"&gt;float64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c"&gt;// Pointer receiver&lt;/span&gt;
    &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="n"&gt;factor&lt;/span&gt;
    &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="n"&gt;factor&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Interfaces
&lt;/h2&gt;

&lt;p&gt;Interfaces define method signatures, enabling polymorphism without explicit implementation declarations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;Shape&lt;/span&gt; &lt;span class="k"&gt;interface&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Area&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="kt"&gt;float64&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;printArea&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="n"&gt;Shape&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Area:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Area&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Types like &lt;code&gt;Rect&lt;/code&gt; or &lt;code&gt;Circle&lt;/code&gt; implicitly implement &lt;code&gt;Shape&lt;/code&gt; if they define &lt;code&gt;Area()&lt;/code&gt;. The empty interface &lt;code&gt;interface{}&lt;/code&gt; can hold any value.&lt;/p&gt;

&lt;h2&gt;
  
  
  Concurrency
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Goroutines
&lt;/h3&gt;

&lt;p&gt;Goroutines are lightweight, concurrent functions managed by the Go runtime:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s"&gt;"time"&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;say&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;100&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Millisecond&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;go&lt;/span&gt; &lt;span class="n"&gt;say&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"World"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// Runs concurrently&lt;/span&gt;
    &lt;span class="n"&gt;say&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="c"&gt;// Runs in main goroutine&lt;/span&gt;
    &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;500&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Millisecond&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// Wait&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Channels
&lt;/h3&gt;

&lt;p&gt;Channels enable communication and synchronization between goroutines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;make&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;chan&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// Unbuffered channel&lt;/span&gt;
&lt;span class="k"&gt;go&lt;/span&gt; &lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="s"&gt;"ping"&lt;/span&gt; &lt;span class="c"&gt;// Send&lt;/span&gt;
&lt;span class="p"&gt;}()&lt;/span&gt;
&lt;span class="n"&gt;msg&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="c"&gt;// Receive&lt;/span&gt;
&lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// Output: ping&lt;/span&gt;
&lt;span class="nb"&gt;close&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;// Close channel&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Error Handling
&lt;/h2&gt;

&lt;p&gt;Go uses explicit error return values, with &lt;code&gt;nil&lt;/code&gt; indicating success:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s"&gt;"os"&lt;/span&gt;

&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"filename.txt"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Fatal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Error opening file:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;defer&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c"&gt;// Close when function returns&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;defer&lt;/code&gt; statement schedules cleanup tasks for when the surrounding function exits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Standard Library Highlights
&lt;/h2&gt;

&lt;p&gt;Go’s standard library is rich and versatile, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;fmt&lt;/code&gt;: Formatted I/O&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;net/http&lt;/code&gt;: Web servers and clients&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;encoding/json&lt;/code&gt;: JSON processing&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;os&lt;/code&gt;: File and system operations&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;io&lt;/code&gt;: I/O primitives&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;strings&lt;/code&gt;, &lt;code&gt;strconv&lt;/code&gt;: String manipulation&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;time&lt;/code&gt;: Time-related functions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sync&lt;/code&gt;: Concurrency synchronization&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;errors&lt;/code&gt;: Error creation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Explore the full library at &lt;a href="https://pkg.go.dev/std" rel="noopener noreferrer"&gt;https://pkg.go.dev/std&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building and Running Go Programs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;go run &amp;lt;file&amp;gt;.go&lt;/code&gt;: Compiles and runs without saving a binary.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;go build&lt;/code&gt;: Creates an executable binary in the current directory.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;go install&lt;/code&gt;: Compiles and installs the binary to &lt;code&gt;$GOPATH/bin&lt;/code&gt; or &lt;code&gt;$GOBIN&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Next Steps &amp;amp; Resources
&lt;/h2&gt;

&lt;p&gt;To deepen your Go knowledge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Go Modules&lt;/strong&gt;: Manage dependencies with &lt;code&gt;go mod init&lt;/code&gt; and &lt;code&gt;go get&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing&lt;/strong&gt;: Write tests using the &lt;code&gt;testing&lt;/code&gt; package and &lt;code&gt;go test&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Advanced Concurrency&lt;/strong&gt;: Explore &lt;code&gt;select&lt;/code&gt;, &lt;code&gt;sync.Mutex&lt;/code&gt;, and &lt;code&gt;sync.WaitGroup&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context Package&lt;/strong&gt;: Handle cancellations and deadlines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build Projects&lt;/strong&gt;: Create a web service, CLI tool, or microservice.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Recommended Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Official Go Tour: &lt;a href="https://go.dev/tour/" rel="noopener noreferrer"&gt;https://go.dev/tour/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Effective Go: &lt;a href="https://go.dev/doc/effective_go" rel="noopener noreferrer"&gt;https://go.dev/doc/effective_go&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Go Documentation: &lt;a href="https://pkg.go.dev/std" rel="noopener noreferrer"&gt;https://pkg.go.dev/std&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Go is a versatile, efficient, and beginner-friendly language with a thriving ecosystem. Its simplicity, performance, and concurrency features make it ideal for modern applications. Start experimenting with Go today, and join the growing community of developers building the future!&lt;/p&gt;

</description>
      <category>go</category>
      <category>beginners</category>
      <category>programming</category>
      <category>devops</category>
    </item>
    <item>
      <title>Using VIM as your Flutter IDE</title>
      <dc:creator>Bharat Makwana</dc:creator>
      <pubDate>Fri, 30 Jul 2021 13:27:13 +0000</pubDate>
      <link>https://forem.com/bharatmk256/using-vim-as-your-flutter-ide-28dl</link>
      <guid>https://forem.com/bharatmk256/using-vim-as-your-flutter-ide-28dl</guid>
      <description>&lt;p&gt;Today we are going to setup vim as your Flutter IDE&lt;/p&gt;

&lt;p&gt;If you have not installed Vim, consider installing NeoVim in your machine.&lt;/p&gt;

&lt;p&gt;Once you have installed Vim in your machine you need to have plugin manager for vim&lt;/p&gt;

&lt;p&gt;I Use Vim plug:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/junegunn/vim-plug" rel="noopener noreferrer"&gt;https://github.com/junegunn/vim-plug&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you have Vim plug installed you have to created .vimrc file (If you are on neo vim you have to create init.vim)&lt;/p&gt;

&lt;p&gt;After that you have to install plugin inside VIM via Vim plug&lt;/p&gt;

&lt;p&gt;In your .vimrc add these 2 lines&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="nc"&gt;Plug&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;dart-lang&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="n"&gt;dart-vim-plugin&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;
&lt;span class="nc"&gt;Plug&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;thosakwe&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="n"&gt;vim-flutter&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you added these 2 lines run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="p"&gt;%&lt;/span&gt;
&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nc"&gt;PlugInstall&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Done: you have installed Flutter in Your Vim setup now you can run flutter app via:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nc"&gt;FlutterRun&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For more you can find more commands here: &lt;a href="https://github.com/thosakwe/vim-flutter" rel="noopener noreferrer"&gt;https://github.com/thosakwe/vim-flutter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vim</category>
      <category>flutter</category>
      <category>ide</category>
    </item>
    <item>
      <title>VIM cheatsheet</title>
      <dc:creator>Bharat Makwana</dc:creator>
      <pubDate>Fri, 26 Feb 2021 06:57:31 +0000</pubDate>
      <link>https://forem.com/bharatmk256/vim-cheatsheet-4jb8</link>
      <guid>https://forem.com/bharatmk256/vim-cheatsheet-4jb8</guid>
      <description>&lt;p&gt;&lt;strong&gt;Exiting:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
:qa ⇒ close alll file&lt;/li&gt;
&lt;li&gt;
:qa! ⇒ close all files, abadon changes&lt;/li&gt;
&lt;li&gt;
:w ⇒ save&lt;/li&gt;
&lt;li&gt;
:wq / :x ⇒ Save and close file&lt;/li&gt;
&lt;li&gt;
:q ⇒ close file&lt;/li&gt;
&lt;li&gt;
:q! ⇒ close files, abadon changes&lt;/li&gt;
&lt;li&gt;
ZZ ⇒ save and quit&lt;/li&gt;
&lt;li&gt;
ZQ ⇒ quit without checking changes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Navigation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
h, j, k, l ⇒ arrow keys&lt;/li&gt;
&lt;li&gt;
 /  ⇒ Half-page up / down&lt;/li&gt;
&lt;li&gt;
 /  ⇒ page up / down&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;words&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
b / w ⇒ previus / next word&lt;/li&gt;
&lt;li&gt;
ge / e ⇒ previus / next end of word&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;line&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
0 (zero) ⇒ start of line&lt;/li&gt;
&lt;li&gt;
^ ⇒ start of line (after white space)&lt;/li&gt;
&lt;li&gt;
$ ⇒ end of line&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;character&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
fc ⇒ go forward to character c&lt;/li&gt;
&lt;li&gt;
FC ⇒ go backword to character c&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;document&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
gg ⇒ first line&lt;/li&gt;
&lt;li&gt;
G ⇒ last line&lt;/li&gt;
&lt;li&gt;
:n ⇒ go to line n&lt;/li&gt;
&lt;li&gt;
nG ⇒ go to line n&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;window&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
zz ⇒ center this line&lt;/li&gt;
&lt;li&gt;
zt ⇒ top this line&lt;/li&gt;
&lt;li&gt;
zb ⇒ bottom this line&lt;/li&gt;
&lt;li&gt;
H ⇒ move to top of the screen&lt;/li&gt;
&lt;li&gt;
M ⇒ move to middle of the screen&lt;/li&gt;
&lt;li&gt;
L ⇒ move to bottom of screen&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;search&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
n ⇒ next matching search pattern&lt;/li&gt;
&lt;li&gt;
N ⇒ pervius match&lt;/li&gt;
&lt;li&gt;
*⇒ next whole word under cursor&lt;/li&gt;
&lt;li&gt;
# ⇒ pervius whole word under cursor&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tab pages&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
:tabedit [file] ⇒ edit file in new tab&lt;/li&gt;
&lt;li&gt;
:tabfind [file] ⇒ open file if exist in new tab&lt;/li&gt;
&lt;li&gt;
:tabclose ⇒ close current tab&lt;/li&gt;
&lt;li&gt;
:tabs ⇒ list all tabs&lt;/li&gt;
&lt;li&gt;
:tabfirst ⇒ go to first tab&lt;/li&gt;
&lt;li&gt;
:tablast ⇒ go to last tab&lt;/li&gt;
&lt;li&gt;
:tabn ⇒ go to next tab&lt;/li&gt;
&lt;li&gt;
:tabp ⇒ go to previus tab&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Editing:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
a ⇒ append&lt;/li&gt;
&lt;li&gt;
A ⇒ append from end of line&lt;/li&gt;
&lt;li&gt;
i ⇒ insert&lt;/li&gt;
&lt;li&gt;
o ⇒ next line&lt;/li&gt;
&lt;li&gt;
O ⇒ previus line&lt;/li&gt;
&lt;li&gt;
s ⇒ delete char and insert&lt;/li&gt;
&lt;li&gt;
S ⇒ delete line and insert&lt;/li&gt;
&lt;li&gt;
C ⇒ delete until end of line and insert&lt;/li&gt;
&lt;li&gt;
r ⇒ replace one character&lt;/li&gt;
&lt;li&gt;
R ⇒ enter replace mode&lt;/li&gt;
&lt;li&gt;
u ⇒ undo changes&lt;/li&gt;
&lt;li&gt;
 ⇒ redo changes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Clipbord:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
x ⇒ delete character&lt;/li&gt;
&lt;li&gt;
dd ⇒ delete line (cut)&lt;/li&gt;
&lt;li&gt;
yy ⇒ yank line (copy)&lt;/li&gt;
&lt;li&gt;
p ⇒ paste&lt;/li&gt;
&lt;li&gt;
P ⇒ paster before&lt;/li&gt;
&lt;li&gt;
"+p / "*p ⇒ paste from system clipborad&lt;/li&gt;
&lt;li&gt;
"+y / "*y ⇒ copy to system clipborad&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Exiting insert mode:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Esc /  ⇒ exit insert mode&lt;/li&gt;
&lt;li&gt;
 ⇒ exit insert mode and abort current command&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Visual mode:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
v ⇒ enter visual mode&lt;/li&gt;
&lt;li&gt;
V ⇒ enter visual line mode&lt;/li&gt;
&lt;li&gt;
 ⇒ enter visual block mode&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;in visual mode&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
d / x ⇒ delete selection&lt;/li&gt;
&lt;li&gt;
s ⇒ replace selection&lt;/li&gt;
&lt;li&gt;
y ⇒ yank selection (copy)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>vim</category>
    </item>
    <item>
      <title>Creating New/Old Flutter project with web support</title>
      <dc:creator>Bharat Makwana</dc:creator>
      <pubDate>Tue, 03 Dec 2019 13:53:46 +0000</pubDate>
      <link>https://forem.com/bharatmk256/creating-new-old-flutter-project-with-web-support-3go6</link>
      <guid>https://forem.com/bharatmk256/creating-new-old-flutter-project-with-web-support-3go6</guid>
      <description>&lt;p&gt;Today I will be guiding you to how to create flutter project with web support&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;There will be 2 portions of this article&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;1: Creating a project from scratch&lt;/p&gt;

&lt;p&gt;2: Adding web support on an old project&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Creating project from scratch&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before starting Make sure you are on flutter Dev channel if you are not&lt;/p&gt;

&lt;p&gt;You need to switch to Dev or Master channel by hitting this command on your terminal&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;flutter channel dev&lt;/p&gt;

&lt;p&gt;flutter channel master&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frjckzdpvz828gfbgu6c8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frjckzdpvz828gfbgu6c8.png" alt="Switching channel" width="734" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Currently, I am on Dev channel&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Enabling web support&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To enable web support you have to write&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;flutter config — enable-web&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fila475yzjdl93zheezx4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fila475yzjdl93zheezx4.png" width="734" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It will enable experimental web support&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Creating a Project&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Now create a project as we usually do&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7vs13xnvaerbxgrbpne9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7vs13xnvaerbxgrbpne9.png" width="734" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see there is a web folder available&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdv0q2a4m6eys8vtw6l7z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdv0q2a4m6eys8vtw6l7z.png" width="346" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And we can run it on Google Chrome and Android emulator&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiw0atnazl4a3wq3az5s5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiw0atnazl4a3wq3az5s5.png" width="625" height="135"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Adding web support on existing project&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;(Create a backup of your project before doing anything)&lt;/p&gt;

&lt;p&gt;As you know you need to switch to dev/master channel (if you are not)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;flutter channel dev&lt;/p&gt;

&lt;p&gt;flutter channel master&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And Enable web support&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;flutter config — enable-web&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now open a terminal in your old flutter project directory and write&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;flutter create.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can see web/index.html (created)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqleu152ld0j4gabgh1yy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqleu152ld0j4gabgh1yy.png" width="734" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All done…&lt;/p&gt;

&lt;p&gt;p.s - ”not all library is supported in flutter web so you might get some errors so take a backup of your project before performing these tasks”&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>webdev</category>
      <category>flutterdev</category>
      <category>dart</category>
    </item>
  </channel>
</rss>
