Skip to content

go: implement improvements from rust #12

go: implement improvements from rust

go: implement improvements from rust #12

Workflow file for this run

name: Go
on:
push:
branches:
- main
paths:
- "go/**"
- ".github/workflows/go.yml"
pull_request:
paths:
- "go/**"
- ".github/workflows/go.yml"
# Cancel previous runs for PRs but not pushes to main
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "^1.21.6"
check-latest: true
- name: "Check go version"
run: go version
- name: Build
working-directory: go
run: chmod +x build.sh && ./build.sh
shell: bash
- name: Format
working-directory: ./go
run: |
if [ -n "$(gofmt -l .)" ]; then
echo "Code is not formatted with gofmt. Please format your code."
gofmt -d .
exit 1
fi
shell: bash