chore(deps): bump golang.org/x/net from 0.0.0-20210614182718-04defd469f4e to 0.23.0 #43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Lint | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
golang-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: setup go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: '1.16' | |
- name: Download golangci-lint | |
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.39.0 | |
- name: Run golangci-lint | |
run: | | |
export PATH=$PATH:$(go env GOPATH)/bin/ | |
make lint | |
- name: Run gofmt | |
working-directory: ./ | |
run: | | |
diffs=`gofmt -l .` | |
if [[ -n $diffs ]]; then | |
echo "Files are not formatted by gofmt:" | |
echo $diffs | |
exit 1 | |
fi | |
- name: Run goimports | |
working-directory: ./ | |
run: | | |
go get golang.org/x/tools/cmd/goimports | |
export PATH=$PATH:$(go env GOPATH)/bin/ | |
diffs=`goimports -d .` | |
if [[ -n $diffs ]]; then | |
echo "Files are not formatted by goimport:" | |
echo $diffs | |
exit 1 | |
fi |