Esempio n. 1
0
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()
}
Esempio n. 2
0
func closeDb(db *dbm.DB) {
	err2 := db.Close()
	if err2 != nil {
		fmt.Printf("can't close")
	}
}