Skip to content

Commit 443e80a

Browse files
committed
Upgrade to jsonpath v0.10.0
And upgrade golangci-lint to v2.2.2
1 parent 2eb3961 commit 443e80a

5 files changed

Lines changed: 8 additions & 5 deletions

File tree

.golangci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ linters:
99
- nestif # redundant, covered by gocyclo
1010
- nlreturn
1111
- wsl
12+
- noinlineerr
1213
exclusions:
1314
generated: lax
1415
paths:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ brew-lint-depends:
3535

3636
.PHONY: debian-lint-depends # Install linting tools on Debian
3737
debian-lint-depends:
38-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin v2.1.6
38+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin v2.2.2
3939

4040
.PHONY: lint # Lint the project
4141
lint: .pre-commit-config.yaml

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ module main
22

33
go 1.24
44

5-
toolchain go1.24.2
5+
toolchain go1.24.5
66

7-
require github.com/theory/jsonpath v0.9.0
7+
require github.com/theory/jsonpath v0.10.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
44
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
55
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
66
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
7-
github.com/theory/jsonpath v0.9.0 h1:7of3UBzdNB9peRb8OyW0Pdo9NATPHTTa2D+Br7rMxEU=
8-
github.com/theory/jsonpath v0.9.0/go.mod h1:yv+crL58A+g3yxLr1sbOyn8H+L/6kS4AMXlXeVGOuNU=
7+
github.com/theory/jsonpath v0.10.0 h1:qjuGwjcWMPfYmhjDnOjP9vmGzISeRzQ/87u2GZIWLoA=
8+
github.com/theory/jsonpath v0.10.0/go.mod h1:yv+crL58A+g3yxLr1sbOyn8H+L/6kS4AMXlXeVGOuNU=
99
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
1010
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

src/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ func execute(query, target string, opts int) string {
5454

5555
// Serialize the result
5656
var buf bytes.Buffer
57+
5758
enc := json.NewEncoder(&buf)
5859
enc.SetEscapeHTML(false)
5960
enc.SetIndent("", " ")
61+
6062
if err := enc.Encode(res); err != nil {
6163
return fmt.Sprintf("Error parsing results: %v", err)
6264
}

0 commit comments

Comments
 (0)