Skip to content

Commit 99c864b

Browse files
committed
Enable Go 1.25 JSONv2 Experiment
That should improve the JSON marshalling/unmarshalling performance.
1 parent ccd8ec8 commit 99c864b

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ jobs:
5151
version: v2.5.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) {

0 commit comments

Comments
 (0)