add doc for import package

This commit is contained in:
Cheney 2015-10-16 09:01:31 +08:00
parent c73eba9879
commit 733245997a
1 changed files with 15 additions and 3 deletions

View File

@ -37,10 +37,22 @@ You can read the source code in [example/main.go](https://github.com/chzyer/read
# Usage
* Import package
```
go get gopkg.in/readline.v1
```
or
```
go get https://github.com/chzyer/readline
```
* Simplest example
```go
import "github.com/chzyer/readline"
import "gopkg.in/readline.v1"
rl, err := readline.New("> ")
if err != nil {
@ -83,7 +95,7 @@ for {
```go
import (
"log"
"github.com/chzyer/readline"
"gopkg.in/readline.v1"
)
rl, err := readline.New("> ")
@ -113,7 +125,7 @@ for {
```go
import (
"log"
"github.com/chzyer/readline"
"gopkg.in/readline.v1"
)
var completer = readline.NewPrefixCompleter(