github.com/minio/console@v1.4.1/verify-gofmt.sh (about)

     1  #!/bin/bash
     2  
     3  # Expanding gofmt to cover more areas.
     4  # This will include auto generated files created by Swagger.
     5  # Catching the difference due to https://github.com/golang/go/issues/46289
     6  DIFF=$(GO111MODULE=on gofmt -d .)
     7  if [[ -n $DIFF ]];
     8  then
     9  	echo "$DIFF";
    10  	echo "please run gofmt";
    11  	exit 1;
    12  fi