update documentation for opening a new connection with default configuration

This commit is contained in:
Nathan Dao 2015-10-25 11:06:37 +02:00
parent 4bc99bb4fc
commit 779f00d26c
1 changed files with 7 additions and 1 deletions

View File

@ -133,7 +133,13 @@ If you don't use a configuration, LedisDB will use the default for you.
## Package Example
import "github.com/siddontang/ledisdb/ledis"
import (
lediscfg "github.com/siddontang/ledisdb/config"
"github.com/siddontang/ledisdb/ledis"
)
# Use Ledis's default config
cfg := lediscfg.NewConfigDefault()
l, _ := ledis.Open(cfg)
db, _ := l.Select(0)