Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

code into subdirectory, prepare for adding exp-redis

  • Loading branch information...
commit 9c6c537b23d699b4aa6242eaf312737d3f6b6f1e 1 parent b3dab3d
Simon Zimmermann authored
View
3  .gitignore
@@ -1,8 +1,5 @@
*.6
*.out
-misc/
-bench/
-redis/
godis
_test*
_obj
View
2  commands.go → redis/commands.go
@@ -1,4 +1,4 @@
-package godis
+package redis
import (
"errors"
View
2  commands_test.go → redis/commands_test.go
@@ -1,4 +1,4 @@
-package godis
+package redis
import (
"log"
View
2  conn.go → redis/conn.go
@@ -1,4 +1,4 @@
-package godis
+package redis
import (
"bufio"
View
0  example/.gitignore → redis/example/.gitignore
File renamed without changes
View
0  example/Makefile → redis/example/Makefile
File renamed without changes
View
5 example/list.go → redis/example/list.go
@@ -2,13 +2,14 @@ package main
import (
"fmt"
- "github.com/simonz05/godis"
"os"
+
+ "github.com/simonz05/godis/redis"
)
func main() {
// new client on default port 6379, select db 0 and use no password.
- c := godis.New("", 0, "")
+ c := redis.New("", 0, "")
// values we want to store
values := []int{0, 1, 1, 2, 3, 5, 8, 13, 21, 34}
View
4 example/string.go → redis/example/string.go
@@ -2,13 +2,13 @@ package main
import (
"fmt"
- "github.com/simonz05/godis"
+ "github.com/simonz05/godis/redis"
"os"
)
func main() {
// new client on default port 6379, select db 0 and use no password
- c := godis.New("", 0, "")
+ c := redis.New("", 0, "")
// set the key "foo" to "Hello Redis"
if err := c.Set("foo", "Hello Redis"); err != nil {
View
4 example/transaction.go → redis/example/transaction.go
@@ -2,11 +2,11 @@ package main
import (
"fmt"
- "github.com/simonz05/godis"
+ "github.com/simonz05/godis/redis"
)
func main() {
- c := godis.NewPipeClient("", 0, "")
+ c := redis.NewPipeClient("", 0, "")
c.Multi()
c.Set("foo", 1)
View
0  fmt.sh → redis/fmt.sh
File renamed without changes
View
2  godis.go → redis/godis.go
@@ -1,7 +1,7 @@
// package godis implements a client for Redis with support
// for all commands and features such as transactions and
// pubsub.
-package godis
+package redis
import (
"bytes"
View
2  godis_test.go → redis/godis_test.go
@@ -1,4 +1,4 @@
-package godis
+package redis
import (
"bufio"
View
2  pool_test.go → redis/pool_test.go
@@ -1,4 +1,4 @@
-package godis
+package redis
import (
"testing"
View
10 readme.md → redis/readme.md
@@ -3,14 +3,14 @@
godis - a [Redis](http://redis.io) client for Go. It supports all
commands and features such as transactions and pubsub.
-1. [Package docs](http://gopkgdoc.appspot.com/pkg/github.com/simonz05/godis)
-2. [Source code](https://github.com/simonz05/godis)
+1. [Package docs](http://gopkgdoc.appspot.com/pkg/github.com/simonz05/godis/redis)
+2. [Source code](https://github.com/simonz05/godis/redis)
## Install godis
godis is available at github.com. Get it by running.
- $ go get github.com/simonz05/godis
+ $ go get github.com/simonz05/godis/redis
Importing godis to your code can be done with `import "github.com/simonz05/godis"`. Thats it!
@@ -23,13 +23,13 @@ the `example/strings.go`.
import (
"fmt"
- "github.com/simonz05/godis"
+ "github.com/simonz05/godis/redis"
"os"
)
func main() {
// new client on default port 6379, select db 0 and use no password
- c := godis.New("", 0, "")
+ c := redis.New("", 0, "")
// set the key "foo" to "Hello Redis"
if err := c.Set("foo", "Hello Redis"); err != nil {
Please sign in to comment.
Something went wrong with that request. Please try again.