...

Text file src/github.com/chrismellard/docker-credential-acr-env/hack/gofmt.sh

Documentation: github.com/chrismellard/docker-credential-acr-env/hack

     1#!/bin/bash
     2
     3files=$(find . -name "*.go" | grep -v vendor/ | xargs gofmt -l -s)
     4if [[ $files ]]; then
     5    echo "Gofmt errors in files:"
     6    echo "$files"
     7    diff=$(find . -name "*.go" | grep -v vendor/ | xargs gofmt -d -s)
     8    echo "$diff"
     9    exit 1
    10fi

View as plain text