Skip to content

Commit 64dda37

Browse files
committed
CLEANUP/MINOR: resolve swag deprecating functions
1 parent 57efa1a commit 64dda37

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

crs/api/ingress/v1/tcp.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
package v1
1717

1818
import (
19-
"github.com/go-openapi/swag"
19+
"github.com/go-openapi/swag/jsonutils"
2020
"github.com/haproxytech/client-native/v5/models"
2121
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2222
)
@@ -161,13 +161,13 @@ func (s *TCPService) MarshalBinary() ([]byte, error) {
161161
if s == nil {
162162
return nil, nil
163163
}
164-
return swag.WriteJSON(s)
164+
return jsonutils.WriteJSON(s)
165165
}
166166

167167
// UnmarshalBinary interface implementation
168168
func (s *TCPService) UnmarshalBinary(b []byte) error {
169169
var res TCPService
170-
if err := swag.ReadJSON(b, &res); err != nil {
170+
if err := jsonutils.ReadJSON(b, &res); err != nil {
171171
return err
172172
}
173173
*s = res

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5
77
github.com/Masterminds/semver/v3 v3.4.0
88
github.com/fasthttp/router v1.5.4
9-
github.com/go-openapi/swag v0.25.4
9+
github.com/go-openapi/swag/jsonutils v0.25.4
1010
github.com/go-test/deep v1.1.1
1111
github.com/google/go-cmp v0.7.0
1212
github.com/google/renameio v1.0.1
@@ -47,11 +47,11 @@ require (
4747
github.com/go-openapi/loads v0.22.0 // indirect
4848
github.com/go-openapi/spec v0.21.0 // indirect
4949
github.com/go-openapi/strfmt v0.23.0 // indirect
50+
github.com/go-openapi/swag v0.25.4 // indirect
5051
github.com/go-openapi/swag/cmdutils v0.25.4 // indirect
5152
github.com/go-openapi/swag/conv v0.25.4 // indirect
5253
github.com/go-openapi/swag/fileutils v0.25.4 // indirect
5354
github.com/go-openapi/swag/jsonname v0.25.4 // indirect
54-
github.com/go-openapi/swag/jsonutils v0.25.4 // indirect
5555
github.com/go-openapi/swag/loading v0.25.4 // indirect
5656
github.com/go-openapi/swag/mangling v0.25.4 // indirect
5757
github.com/go-openapi/swag/netutils v0.25.4 // indirect

0 commit comments

Comments
 (0)