Use buildinfo to set the client version in the user agent (#13)

* Use go:generate to set the user agent version and sha

* regenerate

* buildinfo

* remove unused

* use init to source buildinfo
This commit is contained in:
Nikola Jokic
2025-11-21 14:38:55 +00:00
committed by GitHub
parent c2f0a53402
commit 16a9c915cb
3 changed files with 103 additions and 7 deletions
+14 -1
View File
@@ -29,6 +29,19 @@ jobs:
- name: Check diff
run: git diff --exit-code
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache: false
- name: go generate
run: go generate ./...
- name: Check diff
run: git diff --exit-code
lint:
runs-on: ubuntu-latest
steps:
@@ -52,4 +65,4 @@ jobs:
go-version-file: "go.mod"
cache: false
- name: Run tests
run: go test ./...
run: go test ./...