remove logyard references and update README
also fix local gopath
This commit is contained in:
parent
1a694c85a6
commit
989b0425dc
|
@ -1 +1,3 @@
|
|||
.test
|
||||
.go
|
||||
|
||||
|
|
8
Makefile
8
Makefile
|
@ -1,7 +1,13 @@
|
|||
default: test
|
||||
|
||||
setup:
|
||||
GOPATH=`pwd`/.go go get -d -v .
|
||||
GOPATH=`pwd`/.go go test -v -i
|
||||
rm -f `pwd`/.go/src/tail
|
||||
ln -sf `pwd` `pwd`/.go/src/tail
|
||||
|
||||
test: *.go
|
||||
GOPATH=~/as/logyard go test -v
|
||||
GOPATH=`pwd`/.go go test -v
|
||||
|
||||
fmt:
|
||||
go fmt .
|
||||
|
|
22
README.md
22
README.md
|
@ -3,16 +3,26 @@
|
|||
A Go package striving to emulate the BSD `tail` program.
|
||||
|
||||
```Go
|
||||
t := tail.TailFile("/var/log/nginx.log", 1000, true, true)
|
||||
t := tail.TailFile("/var/log/nginx.log", tail.Config{Follow: true})
|
||||
for line := range t.Lines {
|
||||
fmt.Println(line.Text)
|
||||
}
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
To build and test the package,
|
||||
|
||||
make setup
|
||||
make test
|
||||
|
||||
To build the command-line program `gotail`,
|
||||
|
||||
cd cmd/gotail
|
||||
make
|
||||
./gotail -h
|
||||
|
||||
## TODO
|
||||
|
||||
* tests
|
||||
* command line program (`tail -f ...`)
|
||||
* refactor: use Config? `NewTail(tail.Config{Filename: "", Follow: tail.FOLLOW_NAME})`
|
||||
* refactor: get rid of 'end' flag; allow `-n <number>` with `-n -1`
|
||||
for end.
|
||||
* Support arbitrary values for `Location`
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
default: gotail
|
||||
|
||||
gotail: *.go ../../*.go
|
||||
GOPATH=~/as/logyard go build
|
||||
GOPATH=`pwd`/../../.go go build
|
||||
|
|
|
@ -2,7 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"logyard/tail"
|
||||
"tail"
|
||||
"flag"
|
||||
"os"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue