Skip to content

Commit e5dcc3f

Browse files
authored
build(deps): update HAR library (#1313)
The HAR library as we use it here depends on implementation details. Instead of the `UnmarshalJSON` and `MarshalJSON` functions that are (no longer) defined in the library, we should use `encoding/json` directly and let it do the indirection instead.
1 parent ef2d806 commit e5dcc3f

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

experimental/e2e/storage/har.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package storage
33
import (
44
"bytes"
55
"context"
6+
"encoding/json"
67
"fmt"
78
"io"
89
"net/http"
@@ -246,7 +247,7 @@ func (s *HAR) saveUnsafe() error {
246247
if err != nil {
247248
return err
248249
}
249-
raw, err := s.har.MarshalJSON()
250+
raw, err := json.Marshal(s.har)
250251
if err != nil {
251252
return err
252253
}
@@ -265,7 +266,8 @@ func (s *HAR) loadUnsafe() error {
265266
if err != nil {
266267
return err
267268
}
268-
return s.har.UnmarshalJSON(raw)
269+
270+
return json.Unmarshal(raw, &s.har)
269271
}
270272

271273
// Match returns the stored http.Response for the given request.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.24.1
55
require (
66
github.com/apache/arrow-go/v18 v18.2.0
77
github.com/cheekybits/genny v1.0.0
8-
github.com/chromedp/cdproto v0.0.0-20220208224320-6efb837e6bc2
8+
github.com/chromedp/cdproto v0.0.0-20250429231605-6ed5b53462d4
99
github.com/elazarl/goproxy v1.7.2
1010
github.com/getkin/kin-openapi v0.132.0
1111
github.com/go-openapi/loads v0.22.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitf
2525
github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ=
2626
github.com/chromedp/cdproto v0.0.0-20220208224320-6efb837e6bc2 h1:XCdvHbz3LhewBHN7+mQPx0sg/Hxil/1USnBmxkjHcmY=
2727
github.com/chromedp/cdproto v0.0.0-20220208224320-6efb837e6bc2/go.mod h1:At5TxYYdxkbQL0TSefRjhLE3Q0lgvqKKMSFUglJ7i1U=
28+
github.com/chromedp/cdproto v0.0.0-20250429231605-6ed5b53462d4 h1:UZdrvid2JFwnvPlUSEFlE794XZL4Jmrj8fuxfcLECJE=
29+
github.com/chromedp/cdproto v0.0.0-20250429231605-6ed5b53462d4/go.mod h1:NItd7aLkcfOA/dcMXvl8p1u+lQqioRMq/SqDp71Pb/k=
2830
github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww=
2931
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
3032
github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc=

0 commit comments

Comments
 (0)