Skip to content

Commit 9f5dd9b

Browse files
committed
Added basic CI
1 parent 6f61100 commit 9f5dd9b

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: go
2+
3+
go:
4+
- "1.x" # use the latest Go release
5+
6+
env:
7+
- GO111MODULE=on
8+
9+
before_script:
10+
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.14.0
11+
- go get github.com/mattn/goveralls
12+
13+
script:
14+
- golangci-lint run ./...
15+
- go test -coverpkg=$(go list ./... | tr '\n' ',') -coverprofile=cover.out -v -race -covermode=atomic ./...
16+
- goveralls -coverprofile=cover.out -service=travis-ci

cmd/send/session/state.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ func (s *Session) dumpStats() {
109109
}
110110

111111
func (s *Session) close(calledFromCloseHandler bool) {
112-
if calledFromCloseHandler == false {
112+
if !calledFromCloseHandler {
113113
s.dataChannel.Close()
114114
}
115115

116116
// Sometime, onCloseHandler is not invoked, so it's a work-around
117117
s.doneCheckLock.Lock()
118-
if s.doneCheck == true {
118+
if s.doneCheck {
119119
s.doneCheckLock.Unlock()
120120
return
121121
}

0 commit comments

Comments
 (0)