The classic first program.
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
Explanation:
package maindeclares this file as part of the main package, the entry point of the application.import "fmt"imports thefmtpackage, providing formatting and printing functions.func main()defines the main function where the program execution begins.fmt.Printlnprints the given string to standard output.