#!/bin/bash

set -exuo pipefail
export GO111MODULE=on
export GOTOOLCHAIN=local
go fmt ./...
cd _examples && go fmt ./...
if [[ $(git --no-pager diff) ]] ; then
    echo "you need to run "go fmt" and commit the changes"
    git --no-pager diff
    exit 1
fi
