Skip to content
This repository was archived by the owner on Jan 17, 2021. It is now read-only.

Commit 2191e8c

Browse files
committed
Add CI
1 parent c989459 commit 2191e8c

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
vendor
22
bin
3+
.vscode

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: go
2+
3+
go:
4+
- 1.12.x
5+
script:
6+
- ./lint.sh
7+
- go test -v ./...

lint.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
files=$(gofmt -l -s .)
6+
7+
if [ ! -z "$files" ];
8+
then
9+
echo "The following files need to be formatted:"
10+
echo "$files"
11+
echo "Please run 'gofmt -w -s .'"
12+
exit 1
13+
fi
14+
15+
go vet -composites=false .

0 commit comments

Comments
 (0)