func alreadyBeingHandled(input string) bool { c := redis.Client{Addr: addr, Password: pass} c.Auth(pass) check, _ := c.Exists(input) return check }
func setToBeHandled(input string) { c := redis.Client{Addr: addr, Password: pass} c.Auth(pass) c.Set(input, "1") c.Expire(input, EXPIRETIME) }
func checkLearningDB(msg string) bool { /*set up redis client*/ c := redis.Client{Addr: addr, Password: pass} c.Auth(pass) // hash the message hash := md5hash(msg) // check databse check, _ := c.Exists(hash) if check == true { return true } else { return false } }