Skip to content

Commit

Permalink
fix: with new go 1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
mlajkim committed Dec 10, 2024
1 parent 4eabb2f commit dfed460
Show file tree
Hide file tree
Showing 963 changed files with 94,478 additions and 73,954 deletions.
5 changes: 2 additions & 3 deletions cmd/kube-mgmt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
"net/http"
"os"
"path"
Expand Down Expand Up @@ -141,7 +140,7 @@ func run(params *params) {
}

if params.opaAuthFile != "" {
file, err := ioutil.ReadFile(params.opaAuthFile)
file, err := os.ReadFile(params.opaAuthFile)
if err != nil {
logrus.Fatalf("Failed to read opa auth token file %s", params.opaAuthFile)
}
Expand All @@ -162,7 +161,7 @@ func run(params *params) {
if rootCAs == nil {
rootCAs = x509.NewCertPool()
}
certs, err := ioutil.ReadFile(params.opaCAFile)
certs, err := os.ReadFile(params.opaCAFile)
if err != nil {
logrus.Fatalf("Failed to read opa certificate authority file %s", params.opaCAFile)
}
Expand Down
19 changes: 9 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,44 @@ go 1.23
require (
github.com/sirupsen/logrus v1.8.3
github.com/spf13/cobra v1.3.0
k8s.io/api v0.23.17
k8s.io/apimachinery v0.31.3
k8s.io/client-go v0.23.17
k8s.io/api v0.29.0
k8s.io/apimachinery v0.29.0
k8s.io/client-go v0.29.0
)

require (
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
)

require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect; indire4ct
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/imdario/mergo v0.3.5 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/term v0.25.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
64 changes: 28 additions & 36 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pkg/data/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ type resourceEventQueue struct {
}

// OnAdd implements ResourceHandler
func (q resourceEventQueue) OnAdd(obj interface{}) {
func (q resourceEventQueue) OnAdd(obj interface{}, isInInitialList bool) {
key, err := cache.MetaNamespaceKeyFunc(obj)
if err != nil {
logrus.Warnf("failed to retrieve key: %v", err)
Expand Down Expand Up @@ -210,7 +210,7 @@ func (q resourceEventQueue) resourceVersionMatch(oldObj, newObj interface{}) boo
// OnUpdate implements ResourceHandler
func (q resourceEventQueue) OnUpdate(oldObj, newObj interface{}) {
if !q.resourceVersionMatch(oldObj, newObj) { // Avoid sync flood on relist. We don't use resync.
q.OnAdd(newObj)
q.OnAdd(newObj, false)
}
}

Expand Down
71 changes: 71 additions & 0 deletions vendor/github.com/emicklei/go-restful/v3/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/github.com/emicklei/go-restful/v3/.goconvey

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions vendor/github.com/emicklei/go-restful/v3/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dfed460

Please sign in to comment.