Go is a C-style procedural programming language, also referred to as Golang. Let's try creating a simple program using basic development tools.
- Prerequisite: Go development environment setup
Creating the First Program in Go
package main
import (
"fmt"
)
func main() {
fmt.Println("Hello World!")
}
$ mkdir hello-world && cd $_
$ go mod init codeandtips/examples/hello-world
$ go run .
Hello World!
$ go build
$ ./hello-world
Hello World!
C C++ C# Clojure Crystal D Dart Erlang F# Haskell Java Javascript Julia Kotlin Lua Python Rust Scala Swift Typescript