Article Outline
Go programming example 'golang-HelloWorld2'
golang-HelloWorld2
Golang beginners example: golang-HelloWorld2
package main
// import required modules
import (
"fmt"
)
// in go you can write comments after "//"
/*
to write multiline comments you can write
inside of "/ *" and "* /" (without the spaces
*/
func main() {
// declare a variable
var str = "Hello World"
// print variable
fmt.Println(str)
}
Useful links
- Learn Go: https://golangr.com
- Download Go: https://golang.org