Skip to content

Commit 31ad8d6

Browse files
committed
Enable Go 1.25 JSONv2 Experiment
That should improve the JSON marshalling/unmarshalling performance.
1 parent 74276fa commit 31ad8d6

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ jobs:
4848
- name: Lint
4949
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8
5050
with:
51-
version: v2.3.1
51+
version: v2.4.0
5252

5353
- name: Test
54-
run: go test -v ./...
54+
run: make test
5555

5656
- name: Fuzz Test
5757
run: go test -fuzz=FuzzCalculateFileChunks -fuzztime=10s ./util
5858

5959
- name: Build
60-
run: go build .
60+
run: make build
6161

6262
- name: Perform CodeQL Analysis
6363
uses: github/codeql-action/analyze@76621b61decf072c1cee8dd1ce2d2a82d33c17ed # v3
@@ -117,6 +117,7 @@ jobs:
117117
- name: Build
118118
env:
119119
CGO_ENABLED: '0'
120+
GOEXPERIMENT: 'jsonv2'
120121
GOOS: ${{ matrix.os }}
121122
GOARCH: ${{ matrix.arch }}
122123
run: go build .

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
lint:
2+
golangci-lint run
3+
4+
test:
5+
GOEXPERIMENT=jsonv2 go test ./...
6+
7+
build:
8+
GOEXPERIMENT=jsonv2 go build .
9+
10+
.PHONY: lint test build

fhir/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ func TestPollAsyncStatus(t *testing.T) {
494494

495495
_, err := pollAsyncStatus(server)
496496

497-
assert.Equal(t, "error while reading the outcome of an error response in the async response bundle: json: cannot unmarshal array into Go value of type fhir.OperationOutcome", err.Error())
497+
assert.Equal(t, "error while reading the outcome of an error response in the async response bundle: json: cannot unmarshal JSON array into Go type fhir.OperationOutcome", err.Error())
498498
})
499499

500500
t.Run("async response with error bundle entry with outcome", func(t *testing.T) {

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module github.com/samply/blazectl
22

3-
go 1.24
3+
go 1.25
44

5-
toolchain go1.24.6
5+
toolchain go1.25.0
66

77
require (
88
github.com/goccy/go-yaml v1.18.0

0 commit comments

Comments
 (0)