Created
September 6, 2019 23:00
-
-
Save joshuaaguilar20/f506757ebeb6e5daa8bac8a783e3b94b to your computer and use it in GitHub Desktop.
Go Iota
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
const ( | |
A0 = iota | |
A1 = iota | |
A2 = iota | |
) | |
//fmt.Println(C0, C1, C2) // "0 1 2" | |
//This can be simplified to | |
const ( | |
C0 = iota | |
C1 | |
C2 | |
) | |
func main() { | |
fmt.Print(C2) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment