# Hello World! First Golang Program

Hello Friends, Today we will understand and write our Golang code from scratch. We will go through the pre-requisites and later will go through the code.

---

### The requirement for running GO.

For executing any go program, the following steps must be followed.
We must have Go binaries installed on our machine. for that please follow the steps in the [link](https://go.dev/doc/install)

---

### Writing Hello Go Example

Save the below code in the main.go file.

```
package main

import "fmt"

func main() {
    fmt.Println("Hello World")
}
```
---

### Running the code

Run the code by running the below command.

```
go run main.go
```


![Screenshot 2022-07-03 at 1.50.34 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1657213642183/86rRarwww.png align="left")
---

### Understanding the program

- **package** is used to tell which component it belongs to. for our example, it is in the main package.
- **import** is used to import libraries in the golang. fmt is a go-provided library that helps to spit out output in the command line.
- **fmt.Println()** is used to print statements in golang.

---

Thanks for reading. I hope this story was helpful. 

If you are interested, check out [my other articles.](https://hashnode.shubhamdeshmukh.com/)

you can also visit [shubhamdeshmukh.com](http://shubhamdeshmukh.com/blogs).

GitHub: https://github.com/sd2995/GoLang/tree/main/HelloWorldGo
