I want something like this in go
table
map[string]table
what I have tired for map[string]table
is mentioned below but not sure if its the right approach:
package main
import (
"fmt"
)
type table struct{
a,b []int
c []string
}
func main() {
mytable := make(map[string]table)
var a1 []int
var b1 []int
var c1 []int
a1=append(a1,1)
a1=append(a1,1)
b1=append(b1,2)
c1=append(c1,"Golang")
t1 := table{a1,b1,c1}
mytable["abc"]=t1
}
I need the table since I will be using the data for the CSV file. Let me know the best approach for doing this.