> ## Content Index
> Fetch the complete content index at: https://scriptcrunch.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Getting Started With Go: Beginner Tutorial
- URL: https://scriptcrunch.com/golang-for-devops/
- Published: 2019-07-03T03:26:28.000Z
- Updated: 2026-06-23T08:56:09.000Z
- Author: Scriptcrunch Editorial
- Tags: Go, #Migrated-1758801465347, #wp, #wp-post, #Import 2025-09-25 11:57

Create a file named `main.go` in your project directory.

package main import "fmt" func main() { fmt.Println("Hellow World Scripties") }

From the above code, you should be having the following questions.

1. How do I run this code?
2. What does **package main** mean?
3. What does **import fmt** mean?
4. What does **func** mean?
5. How is the **main.[go](https://scriptcrunch.com/tag/go/)** file organized?

### How do I run this code

Open the terminal and browse to your project folder containing main.go file

Execute your main.go program using the following command.

go run main.go

Following are the available commands in Go. In that, we have used **run** command to execute our hello world program.

build compile packages and dependencies clean remove object files doc show documentation for package or symbol env print Go environment information bug start a bug report fix run go tool fix on packages fmt run gofmt on package sources generate generate Go files by processing source get download and install packages and dependencies install compile and install packages and dependencies list list packages run compile and run Go program test test packages tool run specified go tool version print Go version vet run go tool vet on packages

### What does **package main** mean:

Every go program must start with a package declaration. It is for code organization and reusability.

There are two types of packages

1. **Executable:** Can be executed directly through a command line or a click. This is normally used for creating small utilities. Each executable package is meant for some functionality. Once such example is creating a [database](https://scriptcrunch.com/tag/databases/) backup.
2. **Reusable:** Reusable packages are helper functions or reusable codes or a library that can be called within other program files.

How do you know you are creating an **executable** package or **reusable** package?

If your package declaration starts with **main**, it means you are creating an executable package. Any name other than **main** will be a reusable package.

![](https://storage.ghost.io/c/98/9f/989fb5e0-fca9-4938-afe7-999714e98540/content/images/2025/09/untitled-diagram.jpg)

### What does **import fmt** mean?

It imports a package named fmt. This package helps in printing text to the standard output. It is a standard library. You can view the list of standard libraries available from here

**func main()**

func represent function. The go program execution starts from the main function. This main function will always reside in the main package file.

**fmt.Println("Hellow World Scripties")**  prints the text mentioned inside the quotes to the standard output.