Skip to content

Commit

Permalink
remove logyard references and update README
Browse files Browse the repository at this point in the history
also fix local gopath
  • Loading branch information
Sridhar Ratnakumar committed Oct 17, 2012
1 parent 1a694c8 commit 989b042
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.test
.go

8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

2 changes: 1 addition & 1 deletion cmd/gotail/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
default: gotail

gotail: *.go ../../*.go
GOPATH=~/as/logyard go build
GOPATH=`pwd`/../../.go go build
2 changes: 1 addition & 1 deletion cmd/gotail/gotail.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"fmt"
"logyard/tail"
"tail"
"flag"
"os"
)
Expand Down

0 comments on commit 989b042

Please sign in to comment.