Basics types in Go
strings, integers, floats, booleans etc
package main
import (
"fmt"
)
func main() {
fmt.Println("hello world")
// strings
fmt.Println("hello" + "world")
// int
fmt.Printf("the int sum is %d", 1 + 2) //formatted string
// float
fmt.Println(1.2 + 23)
// boolean
fmt.Println(true && false)
}Last updated