Use go 1.9 in travis. Add gofmt check in CI. go fmt for sample/github_hmac/handler.go

Signed-off-by: Minh-Quan TRAN <account@itscaro.me>
This commit is contained in:
Minh-Quan TRAN
2017-09-12 10:40:25 +02:00
committed by Alex Ellis
parent fa5668b52a
commit 76a9dd8dd8
3 changed files with 10 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ sudo: required
language: go
go:
- 1.7.x
- 1.9.x
install:
- echo "Please don't go get"
@@ -11,7 +11,7 @@ services:
- docker
before_script:
- curl -sSL test.docker.com | sudo -E sh
- curl -sSL test.docker.com | sudo -E sh
script:
- go get -d -v

View File

@@ -1,7 +1,10 @@
#!/bin/sh
# gofmt
test 0 -ne `gofmt -l . | wc -l` && echo "gofmt needed for:\n" && gofmt -l . && exit 1
# build
docker build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy -t faas-cli . && \
docker create --name faas-cli faas-cli && \
docker cp faas-cli:/root/faas-cli . && \
docker rm -f faas-cli

View File

@@ -1,5 +1,9 @@
#!/bin/sh
# gofmt
test 0 -ne `gofmt -l . | wc -l` && echo "gofmt needed for:\n" && gofmt -l . && exit 1
# build
docker build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy -t faas-cli . -f Dockerfile.redist && \
docker create --name faas-cli faas-cli && \
docker cp faas-cli:/root/faas-cli . && \