<?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: Jegan</title>
    <description>The latest articles on DEV Community by Jegan (@m_d4fbe09886e0f586a3c4506).</description>
    <link>https://dev.to/m_d4fbe09886e0f586a3c4506</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%2F3904960%2F1e20ef8b-e8c9-4959-b1c1-9d5d481376ad.png</url>
      <title>DEV Community: Jegan</title>
      <link>https://dev.to/m_d4fbe09886e0f586a3c4506</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/m_d4fbe09886e0f586a3c4506"/>
    <language>en</language>
    <item>
      <title>GO Day1 Learning: Basic Program</title>
      <dc:creator>Jegan</dc:creator>
      <pubDate>Tue, 05 May 2026 06:22:32 +0000</pubDate>
      <link>https://dev.to/m_d4fbe09886e0f586a3c4506/go-day1-learning-basic-program-4h5p</link>
      <guid>https://dev.to/m_d4fbe09886e0f586a3c4506/go-day1-learning-basic-program-4h5p</guid>
      <description>&lt;p&gt;Go is a compiled language — the code is converted into machine‑readable form before execution.&lt;/p&gt;

&lt;p&gt;From a beginner’s perspective, this means Go catches many errors during compilation, giving you cleaner, faster, and more predictable performance at runtime.&lt;/p&gt;

&lt;p&gt;Go is widely used for:&lt;/p&gt;

&lt;p&gt;API development&lt;/p&gt;

&lt;p&gt;CLI tools&lt;/p&gt;

&lt;p&gt;Microservices architecture&lt;/p&gt;

&lt;p&gt;Backend server. &lt;/p&gt;

&lt;p&gt;DEVOPS activity&lt;/p&gt;

&lt;p&gt;So it fits perfectly with the kind of backend and service‑oriented work I’m doing.&lt;/p&gt;

&lt;p&gt;Scripts in Perl, then bash, then python. In Python, distribution needs some work, to package all the dependencies.&lt;br&gt;
Go language gives a complete binary file. Builds all the code, packages all the dependencies and make as a single binary file.&lt;/p&gt;

&lt;p&gt;awesome-go-cli , gotify.net – these sites give many command line tools. download for your OS, just execute that binary.&lt;/p&gt;

&lt;p&gt;Starting With the Classic: “Hello, World!”&lt;br&gt;
Like any programming journey, mine begins with the traditional Hello World program — this time in Go.&lt;/p&gt;

&lt;p&gt;Before writing code, we need to install Go.&lt;/p&gt;

&lt;p&gt;Installing Go&lt;br&gt;
On Linux: download the Go binary package and extract it — the version gets installed automatically.&lt;/p&gt;

&lt;p&gt;On Windows (my setup): download the .exe installer. It sets up Go and updates environment variables automatically.&lt;/p&gt;

&lt;p&gt;Checking the Go Version&lt;br&gt;
I first tried:&lt;/p&gt;

&lt;p&gt;go --version&lt;br&gt;
It didn’t work.&lt;br&gt;
But this one did:&lt;/p&gt;

&lt;p&gt;go version&lt;br&gt;
That confirmed my installation.&lt;/p&gt;

&lt;p&gt;Setting Up the Editor&lt;br&gt;
I’m using VS Code, since I’m already comfortable with it.&lt;br&gt;
Just create a folder, add a .go file, and you’re ready to write your first program.&lt;/p&gt;

&lt;p&gt;Simple Go “Hello World” Program&lt;/p&gt;

&lt;h1&gt;
  
  
  hello.go
&lt;/h1&gt;

&lt;p&gt;package main&lt;/p&gt;

&lt;p&gt;import "fmt"&lt;/p&gt;

&lt;p&gt;// fmt -&amp;gt; format package&lt;br&gt;
// this file belongs to the main package&lt;/p&gt;

&lt;p&gt;func main() {&lt;br&gt;
    fmt.Println("Hello world\n")&lt;br&gt;
    fmt.Print("JTest\n")&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name := "Jtest"
age := 23
fmt.Printf("name: %s, age: %d \n", name, age)

// another way of declaring variables
var name1 string = "test"
var age1 int = 10
fmt.Printf("name1: %s, age1: %d \n", name1, age1)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Key Basics You Should Know&lt;/p&gt;

&lt;p&gt;How to run a Go program&lt;br&gt;
go run hello.go&lt;/p&gt;

&lt;p&gt;How to build a Go program&lt;br&gt;
go build hello.go&lt;br&gt;
This generates an executable file (.exe on Windows).&lt;/p&gt;

&lt;p&gt;Print statements are case‑sensitive&lt;br&gt;&lt;br&gt;
Print, Println, Printf — the P must be capital.&lt;/p&gt;

&lt;p&gt;Use double quotes&lt;br&gt;&lt;br&gt;
Go does not accept single quotes for strings.&lt;/p&gt;

&lt;p&gt;Braces must be on the same line as the function name&lt;br&gt;&lt;br&gt;
Moving { to the next line causes an error.&lt;/p&gt;

&lt;p&gt;Variables cannot be redeclared&lt;br&gt;&lt;br&gt;
Declaring the same variable twice will throw an error.&lt;/p&gt;

&lt;p&gt;After building, I tested the generated hello.exe by running it from the command prompt — and it worked perfectly.&lt;/p&gt;

&lt;p&gt;A special thanks to Jafar for guiding us through the initial setup and concepts.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>go</category>
      <category>learning</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
