func removeProc(pid int, db *levigo.DB) error { wo := levigo.NewWriteOptions() err := db.Delete(wo, []byte(strconv.Itoa(pid))) if err != nil { return err } return killProc(pid) }
func (dr DeleteRequest) Execute(database *levigo.DB, ro *levigo.ReadOptions, wo *levigo.WriteOptions) (*KMinValues, error) { if dr.Key == "" { return nil, NoKeySpecified } keyBytes := []byte(dr.Key) err := database.Delete(wo, keyBytes) return nil, err }
/* DelKey deletes key from provided DB handle. */ func DelKey(key string, db *levigo.DB) bool { writer := levigo.NewWriteOptions() defer writer.Close() err := db.Delete(writer, []byte(key)) if err != nil { golerror.Boohoo("Key "+key+" query failed.", false) return false } return true }