mirror of
https://github.com/hanzoai/yaegi.git
synced 2026-10-01 00:49:47 +00:00
24 lines
269 B
Go
24 lines
269 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
const (
|
|
zero = iota
|
|
one
|
|
two
|
|
three
|
|
)
|
|
|
|
func main() {
|
|
a := [...]string{
|
|
zero: "zero",
|
|
one: "one",
|
|
three: "three",
|
|
three + 2: "five",
|
|
}
|
|
fmt.Printf("%v %T\n", a, a)
|
|
}
|
|
|
|
// Output:
|
|
// [zero one three five] [6]string
|