language: go
go:
    - 1.6.1
    - tip
    
install:
    - go get golang.org/x/tools/cmd/cover
    - go get github.com/mattn/goveralls

script:
    - go get -t -d -v ./...
    - go build -v
    - go test -v -race ./cmd
    - go test -v -cover -covermode=count -coverprofile=coverage.out .
    - $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken=$COVERALLS_TOKEN
language: go
go:
    - 1.6.1
    
install:
    - go get golang.org/x/tools/cmd/cover
    - go get github.com/mattn/goveralls

script:
    - go get -t -d -v ./...
    - go build -v
    - go test -v -race ./cmd
    - go test -v -cover -covermode=count -coverprofile=coverage.out .
    - $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken=$COVERALLS_TOKEN
Remove tip from testing target
Remove tip from testing target

It will cause the following error:

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x470b3b]
goroutine 41 [running]:
panic(0x66b200, 0xc42001a100)
	/home/travis/.gimme/versions/go/src/runtime/panic.go:500 +0x18c
testing.tRunner.func1(0xc42044e840)
	/home/travis/.gimme/versions/go/src/testing/testing.go:519 +0x226
panic(0x66b200, 0xc42001a100)
	/home/travis/.gimme/versions/go/src/runtime/panic.go:458 +0x226
github.com/yinghau76/phabricator-to-slack.(*Slack).PostMessage(0xc420379f50, 0x6b6e0e, 0x4, 0x6ba479, 0x10, 0x0, 0x0)
	github.com/yinghau76/phabricator-to-slack/_test/_obj_test/slack.go:49 +0x42b
github.com/yinghau76/phabricator-to-slack.TestPostMessageError(0xc42044e840)
	/home/travis/gopath/src/github.com/yinghau76/phabricator-to-slack/slack_test.go:51 +0x134
testing.tRunner(0xc42044e840, 0x6d96c0)
	/home/travis/.gimme/versions/go/src/testing/testing.go:547 +0x77
created by testing.(*T).Run
	/home/travis/.gimme/versions/go/src/testing/testing.go:583 +0x2cd
exit status 2
FAIL	github.com/yinghau76/phabricator-to-slack	0.946s
