Skip to content

Commit 1b8663f

Browse files
committed
updated Makefile, formatted files
1 parent 5e8a281 commit 1b8663f

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

Makefile

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
1-
GO_FMT = gofmt -s -w -l .
1+
all: format vet deps test build
22

3-
vet:
4-
@go vet ./...
3+
format:
4+
@echo "formatting files..."
5+
@go get golang.org/x/tools/cmd/goimports
6+
@goimports -w -l .
7+
@gofmt -s -w -l .
58

6-
check:
7-
$(GO_FMT)
9+
vet:
10+
@echo "vetting..."
811
@go vet ./...
912

10-
format:
11-
$(GO_FMT)
13+
deps:
14+
@echo "installing dependencies..."
15+
@go get ./...
1216

1317
test-deps:
1418
@echo "installing test dependencies..."
15-
@go get github.com/stretchr/testify/assert
1619
@go get github.com/smartystreets/goconvey/convey
20+
@go get gopkg.in/h2non/gock.v1
21+
@go get github.com/stretchr/testify/assert
1722
@go get github.com/axw/gocov/...
1823
@go get github.com/AlekSi/gocov-xml
1924
@go get gopkg.in/matm/v1/gocov-html
@@ -24,4 +29,8 @@ test: test-deps
2429
@gocov test ./... -v > test-artifacts/gocov.json
2530
@cat test-artifacts/gocov.json | gocov report
2631
@cat test-artifacts/gocov.json | gocov-xml > test-artifacts/coverage/coverage.xml
27-
@cat test-artifacts/gocov.json | gocov-html > test-artifacts/coverage/coverage.html
32+
@cat test-artifacts/gocov.json | gocov-html > test-artifacts/coverage/coverage.html
33+
34+
build: deps
35+
@echo "building..."
36+
@go build ./...

streams/stream_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ package streams
33
import (
44
"bytes"
55
"encoding/json"
6-
"github.com/stretchr/testify/assert"
76
"math/rand"
87
"reflect"
98
"strconv"
109
"strings"
1110
"testing"
1211
"time"
12+
13+
"github.com/stretchr/testify/assert"
1314
)
1415

1516
var testArray = []string{"peach", "apple", "pear", "plum", "pineapple", "banana", "kiwi", "orange"}

0 commit comments

Comments
 (0)