func ExampleBool() { c, err := dial() if err != nil { panic(err) } defer c.Close() c.Do("SET", "foo", 1) exists, _ := redis.Bool(c.Do("EXISTS", "foo")) fmt.Printf("%#v\n", exists) // Output: // true }
func (d *dataAccess) IsAlertFailing(name string) (bool, error) { defer collect.StartTimer("redis", opentsdb.TagSet{"op": "IsAlertFailing"})() conn := d.GetConnection() defer conn.Close() return redis.Bool(conn.Do("SISMEMBER", failingAlerts, name)) }