module mainstructColor { r int g int b int}pub fn (c Color) str() string {return'{$c.r, $c.g, $c.b}'}fnrgb(r int, g int, b int) Color {return Color{ r: r g: g b: b }}const ( numbers = [1,2,3] // 数组 red = Color{ r: 255 g: 0 b: 0 } // 结构体类型 blue =rgb(0,0,255) // 函数调用返回的结果,作为常量的值)fnmain() {println(numbers)println(red)println(blue)}