Skip to content

Commit

Permalink
Update slices (#897)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankur19 authored Jul 25, 2023
1 parent b7de07a commit 0a6b89a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ require (
github.com/pmezard/go-difflib v1.0.0
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.15.0
golang.org/x/exp v0.0.0-20230725093048-515e97ebf090
google.golang.org/grpc v1.58.0-dev
google.golang.org/protobuf v1.31.0
)
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/exp v0.0.0-20230725093048-515e97ebf090 h1:Di6/M8l0O2lCLc6VVRWhgCiApHV8MnQurBnFSHsQtNY=
golang.org/x/exp v0.0.0-20230725093048-515e97ebf090/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
Expand Down
2 changes: 1 addition & 1 deletion ygot/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,7 @@ func mapJSON(field reflect.Value, parentMod string, args jsonOutputConfig) (any,
}
pairs = append(pairs, mapValuePair{k: kn, v: iter.Value()})
}
slices.SortFunc(pairs, func(a, b mapValuePair) bool { return a.k < b.k })
slices.SortFunc(pairs, func(a, b mapValuePair) int { return strings.Compare(a.k, b.k) })

js, err := mapValuePairsToJSON(pairs, parentMod, args)
errs.Add(err)
Expand Down

0 comments on commit 0a6b89a

Please sign in to comment.