Skip to content

Commit d73805b

Browse files
committed
chore: switch to github.com/goccy/go-yaml for YAML parsing
1 parent 6c36c0d commit d73805b

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

generator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"os"
1212
"strings"
1313

14-
"gopkg.in/yaml.v3"
14+
"github.com/goccy/go-yaml"
1515
)
1616

1717
// An ExportNameFunc returns the exported name for a property.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ require (
66
github.com/alecthomas/assert/v2 v2.6.0
77
github.com/fatih/camelcase v1.0.0
88
github.com/fatih/structtag v1.2.0
9+
github.com/goccy/go-yaml v1.18.0
910
github.com/spf13/pflag v1.0.10
10-
gopkg.in/yaml.v3 v3.0.1
1111
)
1212

1313
require (

go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8
66
github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc=
77
github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4=
88
github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94=
9+
github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
10+
github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
911
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
1012
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
1113
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
1214
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
13-
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
14-
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
15-
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
16-
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

value.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (v *value) observe(a any) *value {
8080
v.empties++
8181
v.zeros++
8282
}
83-
case int:
83+
case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64:
8484
v.ints++
8585
if a == 0 {
8686
v.empties++
@@ -135,6 +135,8 @@ func (v *value) observe(a any) *value {
135135
v.zeros++
136136
}
137137
}
138+
default:
139+
panic(fmt.Errorf("%T: unhandled type", a))
138140
}
139141
return v
140142
}

0 commit comments

Comments
 (0)