func DebugPid() { var db *dbm.DB = dbConnect(dbname) a, _ := db.Array("URLtoPageId") enum, err := a.Enumerator(true) //risky approach key2, value, err := enum.Next() for ; err != io.EOF; key2, value, err = enum.Next() { fmt.Printf("%v %v\n", key2[0].(string), value[0].(int64)) } db.Close() }
func closeDb(db *dbm.DB) { err2 := db.Close() if err2 != nil { fmt.Printf("can't close") } }