Tsallaka zuwa abun ciki
Justice Tech School

Basic Types

int, int64, uint8, float64, string, bool, byte and rune. int is the default integer.

Example
package main

import "fmt"

func main() {
	var i int = 7
	var f float64 = 2.5
	var s string = "Go"
	var b bool = true
	var r rune = 'A'
	fmt.Println(i, f, s, b, r)
}

Result

7 2.5 Go true 65

Exercise

Decimal type.

var f  = 2.5

Quiz Test

What is a rune?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.