Skip to content

Commit 85d52cc

Browse files
committed
Improve CI (#153)
1 parent ca3331d commit 85d52cc

2 files changed

Lines changed: 24 additions & 4 deletions

File tree

.circleci/config.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
# CircleCI Go images available at: https://hub.docker.com/r/circleci/golang/
65
- image: circleci/golang:1.14
76

87
environment:
@@ -16,7 +15,6 @@ jobs:
1615
keys:
1716
- go-mod-v4-{{ checksum "go.sum" }}
1817

19-
# Make sure it builds first
2018
- run: go build
2119

2220
- run:
@@ -37,8 +35,30 @@ jobs:
3735
- store_test_results:
3836
path: /tmp/test-results
3937

38+
gofmt:
39+
docker:
40+
- image: circleci/golang:1.14
41+
42+
steps:
43+
- checkout
44+
- run:
45+
name: "Enforce Go Formatted Code"
46+
command: test $(gofmt -l . | wc -l) -eq 0
47+
48+
govet:
49+
docker:
50+
- image: circleci/golang:1.14
51+
52+
steps:
53+
- checkout
54+
- run:
55+
name: "Go vet"
56+
command: go vet ./...
57+
4058
workflows:
4159
version: 2
4260
build-workflow:
4361
jobs:
4462
- build
63+
- gofmt
64+
- govet

entry.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func (e *Entry) UnmarshalJSON(data []byte) error {
178178
}
179179

180180
func EntryCommitMessage(e *Entry, ec *ECAddress) (*bytes.Buffer, error) {
181-
buf := new(bytes.Buffer)
181+
buf := new(bytes.Buffer)
182182

183183
// 1 byte version
184184
buf.Write([]byte{0})
@@ -209,7 +209,7 @@ func EntryCommitMessage(e *Entry, ec *ECAddress) (*bytes.Buffer, error) {
209209
// Entry Credit Signature.
210210
func ComposeEntryCommit(e *Entry, ec *ECAddress) (*JSON2Request, error) {
211211
b, err := EntryCommitMessage(e, ec)
212-
if err != nil {
212+
if err != nil {
213213
return nil, err
214214
}
215215
params := messageRequest{Message: hex.EncodeToString(b.Bytes())}

0 commit comments

Comments
 (0)