package main import "fmt" func main() { status := GetPlan(1) fmt.Println(status) } func GetPlan(id int) string { return [...]string{ "plan1", "plan2", "plan3", }[id-1] }
package main import "fmt" func main() { status := GetPlan(1) fmt.Println(status) } func GetPlan(id int) string { return [...]string{ "plan1", "plan2", "plan3", }[id-1] }