Update TravisCI to goclean script.
- Also update to use the new container-based builds - Modify the tests slightly to make golint happy
This commit is contained in:
parent
5a477c332b
commit
90e8b84c8b
2 changed files with 17 additions and 6 deletions
13
.travis.yml
13
.travis.yml
|
@ -2,12 +2,17 @@ language: go
|
|||
go:
|
||||
- release
|
||||
- tip
|
||||
sudo: false
|
||||
before_install:
|
||||
- gocleandeps=c16c849abae90c23419d
|
||||
- git clone https://gist.github.com/$gocleandeps.git
|
||||
- goclean=71d0380287747d956a26
|
||||
- git clone https://gist.github.com/$goclean.git
|
||||
install:
|
||||
- go get -d -t -v ./...
|
||||
- go get -v golang.org/x/tools/cmd/cover
|
||||
- bash $gocleandeps/gocleandeps.sh
|
||||
script:
|
||||
- go test -v -covermode=count -coverprofile=profile.cov
|
||||
after_success:
|
||||
- go get -v github.com/mattn/goveralls
|
||||
- export PATH=$PATH:$HOME/gopath/bin
|
||||
- bash $goclean/goclean.sh
|
||||
after_success:
|
||||
- goveralls -coverprofile=profile.cov -service=travis-ci
|
||||
|
|
|
@ -129,10 +129,16 @@ func TstWriteBlockHeader(w io.Writer, pver uint32, bh *BlockHeader) error {
|
|||
return writeBlockHeader(w, pver, bh)
|
||||
}
|
||||
|
||||
// TstMessageHeader is simply a redefinition of the internal messageHeader that
|
||||
// is used to make golint happy since it rightly complains that it's typically
|
||||
// not a good idea to return unexported types.
|
||||
type TstMessageHeader messageHeader
|
||||
|
||||
// TstReadMessageHeader makes the internal readMessageHeader function available
|
||||
// to the test package.
|
||||
func TstReadMessageHeader(r io.Reader) (int, *messageHeader, error) {
|
||||
return readMessageHeader(r)
|
||||
func TstReadMessageHeader(r io.Reader) (int, *TstMessageHeader, error) {
|
||||
n, hdr, err := readMessageHeader(r)
|
||||
return n, (*TstMessageHeader)(hdr), err
|
||||
}
|
||||
|
||||
// TstReadOutPoint makes the internal readOutPoint function available to the
|
||||
|
|
Loading…
Reference in a new issue