File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/sv-tools/mock-http-server
3
3
go 1.24.0
4
4
5
5
require (
6
+ github.com/goccy/go-yaml v1.17.1
6
7
github.com/spf13/pflag v1.0.6
7
8
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6
8
- gopkg.in/yaml.v3 v3.0.1
9
9
)
Original file line number Diff line number Diff line change
1
+ github.com/goccy/go-yaml v1.17.1 h1:LI34wktB2xEE3ONG/2Ar54+/HJVBriAGJ55PHls4YuY =
2
+ github.com/goccy/go-yaml v1.17.1 /go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA =
1
3
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o =
2
4
github.com/spf13/pflag v1.0.6 /go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg =
3
5
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI =
4
6
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 /go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ =
5
- gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM =
6
- gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 /go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0 =
7
- gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA =
8
- gopkg.in/yaml.v3 v3.0.1 /go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM =
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ import (
11
11
"syscall"
12
12
"time"
13
13
14
+ "github.com/goccy/go-yaml"
14
15
flag "github.com/spf13/pflag"
15
16
"golang.org/x/exp/slog"
16
- "gopkg.in/yaml.v3"
17
17
)
18
18
19
19
func main () {
@@ -41,8 +41,7 @@ func main() {
41
41
}
42
42
43
43
var config Config
44
- d := yaml .NewDecoder (f )
45
- d .KnownFields (true )
44
+ d := yaml .NewDecoder (f , yaml .DisallowUnknownField ())
46
45
if err := d .Decode (& config ); err != nil {
47
46
log .Error ("decoding config failed" , err )
48
47
os .Exit (1 )
You can’t perform that action at this time.
0 commit comments