Skip to content

Commit

Permalink
README修正
Browse files Browse the repository at this point in the history
  • Loading branch information
masa23 committed Jul 24, 2019
1 parent 03ad44e commit 27dc941
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# gotail
# gotail [![GoDoc](https://godoc.org/github.com/masa23/gotail?status.svg)](https://godoc.org/github.com/masa23/gotail) [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/hyperium/hyper/master/LICENSE)

gotail is Go library for reading data from realtime updating file , read like "tail -f" command.
See https://godoc.org/github.com/masa23/gotail for the API document.

## License
MIT
Expand Down Expand Up @@ -34,12 +37,14 @@ func main() {
panic(err)
}
tail.Scan()
for {
b := tail.TailString()
for tail.Scan() {
b := tail.Text()
fmt.Println(b)
}
if err = tail.Err(); err != nil {
panic(err)
}
}
```
2 changes: 1 addition & 1 deletion example/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func main() {
fmt.Println(b)
}

if tail.Err() != nil {
if err = tail.Err(); err != nil {
panic(err)
}
}

0 comments on commit 27dc941

Please sign in to comment.