List data tables
This topic describes how to list the names of data tables in an instance using the Go software development kit (SDK).
Prerequisites
Method
func (tableStoreClient *TableStoreClient) ListTable() (*ListTableResponse, error)Sample code
The following sample code queries the data tables in an instance and prints their names.
func ListTableSample(client *tablestore.TableStoreClient){
tables, err := client.ListTable()
if err != nil {
fmt.Println("Failed to list table with error:", err)
} else {
for _, table := range (tables.TableNames) {
fmt.Println(table)
}
}
}