A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/go-language/hello-world-in-golang/ below:

Hello World in Golang - GeeksforGeeks

Hello World in Golang

Last Updated : 12 Jul, 2025

Hello, World! is the first basic program in any programming language. Let’s write the first program in the Go Language using the following steps:

package main
import(
"fmt"
)
func main() {
fmt.Println("!... Hello World ...!")
}

Example: 

Go
// First Go program
package main

import "fmt";

// Main function
func main() {

    fmt.Println("!... Hello World ...!")
}

Output:

!... Hello World ...!
How to run Golang Program?

To run a Go program you need a Go compiler.. Once you have a Go compiler, first you create a program and save your program with extension .go, for example, first.go. Now we run this first.go file in the go compiler using the following command, i.e:

$ go run first.go

If you're not sure how to start, check out Boot.dev's Full Go Course. It is designed for beginners, providing a clear, structured path to help you learn Go at your own pace. From basic syntax to advanced concepts, this course will ensure you develop a strong foundation in Go programming. Take your first step towards mastery, sign up now and start coding today!



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4