language: go
sudo: false
go:
  - 1.12.x
script:
  # run tests on a standard platform
  - OUT="$(go get -a)"; test -z "$OUT" || (echo "$OUT" && return 1)
  - OUT="$(gofmt -l -d ./)"; test -z "$OUT" || (echo "$OUT" && return 1)
  - go vet -v ./...
  - go test -v ./...

  # build test for supported platforms
  - GOOS=linux go build
  - GOOS=darwin go build
  - GOOS=freebsd go build
  - GOOS=windows go build
  - GOARCH=386 go build
