Quick actions

cmd+k|ctrl+k

Navigation

Languages

Constants / iota / Essential Go

Snippet info

Language

Go

Visibility

public

Author

kkowalczyk

Created

2019-09-03T23:05:18Z

Updated

2019-09-03T23:05:18Z

package main

import "fmt"

func main() {
	const (
		a = iota // a = 0
		_        // iota is incremented  to 1
		b        // b = 2
	)
	fmt.Printf("a: %d, b: %d\n", a, b)
}
INFO