March 2019
Intermediate to advanced
336 pages
9h 9m
English
In the following code snippet, the printTable method prints the rows and columns of a table. Rows are traversed, and then for every row the columns are printed:
//printTablefunc printTable(table Table){ var rows []Row = table.Rows fmt.Println(table.Name) for _,row := range rows { var columns []Column = row.Columns for i,column := range columns { fmt.Println(table.ColumnNames[i],column.Id,column.Value); } }}
Read now
Unlock full access