<?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: Vignan Sunkara</title>
    <description>The latest articles on DEV Community by Vignan Sunkara (@vignananil).</description>
    <link>https://dev.to/vignananil</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%2F501821%2F5f1aedb0-4aed-41c0-94e0-e917d956d82d.jpg</url>
      <title>DEV Community: Vignan Sunkara</title>
      <link>https://dev.to/vignananil</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vignananil"/>
    <language>en</language>
    <item>
      <title>GoLang First Program - Hello, World</title>
      <dc:creator>Vignan Sunkara</dc:creator>
      <pubDate>Sun, 25 Feb 2024 15:19:39 +0000</pubDate>
      <link>https://dev.to/vignananil/golang-first-program-hello-world-4jm1</link>
      <guid>https://dev.to/vignananil/golang-first-program-hello-world-4jm1</guid>
      <description>&lt;p&gt;In this tutorial, we will write a simple "Hello, World!" program in GoLang.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Explanation of the Code&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;package main&lt;/code&gt;&lt;/strong&gt;: This line defines the package name. Every Go file starts with a package declaration. Packages are Go's way of organizing and reusing code. The &lt;code&gt;main&lt;/code&gt; package is special because it tells Go that this file will be the entry point of the program. Only the &lt;code&gt;main&lt;/code&gt; package can contain the &lt;code&gt;main&lt;/code&gt; function, which is where execution of the program starts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;import "fmt"&lt;/code&gt;&lt;/strong&gt;: This line imports the &lt;code&gt;fmt&lt;/code&gt; package, which contains functions for formatted I/O (Input/Output) operations. Here, you're using it to print text to the console.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;func main() { ... }&lt;/code&gt;&lt;/strong&gt;: This defines the &lt;code&gt;main&lt;/code&gt; function. As mentioned, the &lt;code&gt;main&lt;/code&gt; function is the entry point of your Go program. The braces &lt;code&gt;{ }&lt;/code&gt; enclose the body of the function.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;fmt.Println("Hello, World!")&lt;/code&gt;&lt;/strong&gt;: Inside the &lt;code&gt;main&lt;/code&gt; function, this line calls the Println function from the &lt;code&gt;fmt&lt;/code&gt; package. &lt;code&gt;Println&lt;/code&gt; stands for "print line", and it outputs the string "Hello, World!" to the console, followed by a newline character.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Run the Program
&lt;/h2&gt;

&lt;p&gt;Save your file with a &lt;code&gt;.go&lt;/code&gt; extension, for example, &lt;code&gt;hello.go&lt;/code&gt;. Open a terminal or command prompt, navigate to the directory where your file is saved, and run the program by typing &lt;code&gt;go run hello.go&lt;/code&gt;. You should see the output &lt;code&gt;Hello, World!&lt;/code&gt; printed to the console.&lt;/p&gt;

&lt;h2&gt;
  
  
  Process
&lt;/h2&gt;

&lt;p&gt;When you run the program using &lt;code&gt;go run&lt;/code&gt;, the Go compiler compiles the code into an executable binary, and then immediately runs that binary.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
