Skip to content

Commit 3aa13c1

Browse files
committed
Require go 1.22 or better now that Trixie has been released
1 parent 09570b4 commit 3aa13c1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/markdingo/netstring
22

3-
go 1.20
3+
go 1.22

marshal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (enc *Encoder) Marshal(eom Key, message any) error {
9393
}
9494

9595
dupes := make(map[Key]string)
96-
for ix := 0; ix < to.NumField(); ix++ {
96+
for ix := range to.NumField() {
9797
sf := to.Field(ix) // Get StructField
9898
if !sf.IsExported() {
9999
continue

unmarshal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (dec *Decoder) Unmarshal(eom Key, message any) (unknown Key, err error) {
8989
}
9090
keyToField := make(map[Key]*field)
9191

92-
for ix := 0; ix < to.NumField(); ix++ {
92+
for ix := range to.NumField() {
9393
sf := to.Field(ix) // Get StructField
9494
if !sf.IsExported() {
9595
continue

0 commit comments

Comments
 (0)