zentures / sequence

(Unmaintained) High performance sequential log analyzer and parser
http://sequencer.io
517 stars 72 forks source link

Readme doesn't say how to run / build #1

Closed ghost closed 9 years ago

ghost commented 9 years ago

Have never built any go code and have not yet worked out how to build.

go build. go run sequnce.go don't produce anything useful.

Please consider including a two liner on how to run/build, if possible.

aminehmida commented 9 years ago

I think that this is a library. If you want to test it then you need to do this :

You need to install the dependancy first:

go get github.com/surge/glog
go get github.com/spf13/cobra

Then :

go run sequence.go
ghost commented 9 years ago

Thanks. I understand it's a library, but presume there is a driver/unit test.

I'll have to look at it later when I've got more time:

[user@holly sequence]$ go run sequence.go go run: cannot run non-main package

zhenjl commented 9 years ago

Hi @jspashett, sorry for the delay in responding. I was completely down last week due to a cold and haven't had a chance to answer questions.

@aminehmida thanks your help!

To run the unit tests, you need to be in the top level sequence dir:

go get github.com/strace/sequence
cd $GOPATH/src/github.com/strace/sequence
go test

To run the actual command you need to

cd $GOPATH/src/github.com/strace/sequence/sequence
go run sequence.go

Note the command is in the sequence/sequence dir.

I am actually, in the next commit, moving the sequence command into the cmd/sequence dir to make it a bit more clear.

Do expect some changes in th next commit as I am trying to wrap up the analyzer part of the library.

ghost commented 9 years ago

Thanks. After go getting testify it worked. I will have a look in more detail soon.

zhenjl commented 9 years ago

If you ran

go get github.com/strace/sequence

It should have gotten all the dependencies as well. Did it not do that?

thx

zhenjl commented 9 years ago

Added usage info to README.md