DEV Community

Cover image for Hello World in Go Language
Isaiah Nathanael
Isaiah Nathanael

Posted on

Hello World in Go Language

If you are just dipping your toes into Go (Golang), the best place to start is, as always, with the timeless "Hello, World!" programme. This simple exercise is more than just a tradition; it is a clear introduction to Go's clean syntax, powerful standard library, and minimalist approach.

package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}
Enter fullscreen mode Exit fullscreen mode

package main Defines the package, where main is the entry point of the program.
import "fmt" Imports the fmt package, which is used for formatted I/O (like printing to the screen).
func main() Defines the main function, which is the entry point for any Go program.

Top comments (0)