You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: scan.go
    path of file: ./repos/feedback/persist
    
    the code of the file until where you have to start completion: package persist

import (
	"fmt"
	"strings"

	"github.com/andrewarrow/feedback/files"
	"github.com/andrewarrow/feedback/models"
	"github.com/andrewarrow/feedback/util"
	"github.com/jmoiron/sqlx"
)

func ScanSchema(dbString string) []*models.Model {
	db := PostgresConnectionByUrl(dbString)
	sql := "SELECT tablename FROM pg_catalog.pg_tables WHERE sc
    
func ScanTable(db *sqlx.DB, table string) []*models.Field {
	list := []*models.Field{}
	sql := fmt.Sprintf("SELECT column_name, data_type FROM information_schema.columns WHERE table_name = '%s'", table)
	rows := SelectAll(db, sql)
	for _, row := range rows {
		col := fmt.Sprintf("%s", row["column_name"])
		dt := fmt.Sprintf("%s", row["data_type"])
		field := models.Field{}
		field.Name = col
		field.Flavor = models.TypeToFlavor(dt)
		//fmt.Println(field)
		list = append(list, &field)
	}
	return list
}