Skip to content

feat: add go check

feat: add go check #1

Workflow file for this run

name: Golang Check
on:
pull_request:
branches:
- main
- develop
jobs:
golang-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '^1.19'
- name: Check Go syntax
run: |
find . -name "*.go" | xargs gofmt -l
if [[ -n $(find . -name "*.go" | xargs gofmt -l) ]]; then
echo "Go files are not syntactically valid, try running 'gofmt -w' to find issues"
exit 1
fi