diff --git a/README.md b/README.md index 7ba0028..621939d 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,22 @@ This is free and unencumbered software released into the [public domain](https://creativecommons.org/publicdomain/zero/1.0). +## Use + +```go +// Redis is a thread-safe client. +var Redis = redis.NewClient("localhost", time.Second, timeSecond) + +func demo() { + newLen, err := Redis.RPUSHString("demo_list", "foo") + if err != nil { + return err // complete description in place + } + log.Printf("demo_list has %d elements now", newLen) +} +``` + + ## Performance A local Unix domain socket connection is roughly twice as fast than TCP.