mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Merge pull request #42085 from cblecker/gofmt-fix
Automatic merge from submit-queue (batch tested with PRs 40055, 42085, 44509, 44568, 43956)
Fix gofmt errors
**What this PR does / why we need it**:
There were some gofmt errors on master. Ran the following to fix:
```
hack/verify-gofmt.sh | grep ^diff | awk '{ print $2 }' | xargs gofmt -w -s
```
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: none
**Special notes for your reviewer**:
**Release note**:
```release-note
NONE
```
This commit is contained in:
@@ -51,9 +51,9 @@ func TestNewGarbageCollector(t *testing.T) {
|
||||
config.ContentConfig.NegotiatedSerializer = nil
|
||||
clientPool := dynamic.NewClientPool(config, api.Registry.RESTMapper(), dynamic.LegacyAPIPathResolverFunc)
|
||||
podResource := map[schema.GroupVersionResource]struct{}{
|
||||
schema.GroupVersionResource{Version: "v1", Resource: "pods"}: {},
|
||||
{Version: "v1", Resource: "pods"}: {},
|
||||
// no monitor will be constructed for non-core resource, the GC construction will not fail.
|
||||
schema.GroupVersionResource{Group: "tpr.io", Version: "v1", Resource: "unknown"}: {},
|
||||
{Group: "tpr.io", Version: "v1", Resource: "unknown"}: {},
|
||||
}
|
||||
gc, err := NewGarbageCollector(metaOnlyClientPool, clientPool, api.Registry.RESTMapper(), podResource)
|
||||
if err != nil {
|
||||
@@ -118,7 +118,7 @@ func setupGC(t *testing.T, config *restclient.Config) *GarbageCollector {
|
||||
metaOnlyClientPool := dynamic.NewClientPool(config, api.Registry.RESTMapper(), dynamic.LegacyAPIPathResolverFunc)
|
||||
config.ContentConfig.NegotiatedSerializer = nil
|
||||
clientPool := dynamic.NewClientPool(config, api.Registry.RESTMapper(), dynamic.LegacyAPIPathResolverFunc)
|
||||
podResource := map[schema.GroupVersionResource]struct{}{schema.GroupVersionResource{Version: "v1", Resource: "pods"}: {}}
|
||||
podResource := map[schema.GroupVersionResource]struct{}{{Version: "v1", Resource: "pods"}: {}}
|
||||
gc, err := NewGarbageCollector(metaOnlyClientPool, clientPool, api.Registry.RESTMapper(), podResource)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
@@ -208,15 +208,15 @@ func (gb *GraphBuilder) Run(stopCh <-chan struct{}) {
|
||||
}
|
||||
|
||||
var ignoredResources = map[schema.GroupVersionResource]struct{}{
|
||||
schema.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "replicationcontrollers"}: {},
|
||||
schema.GroupVersionResource{Group: "", Version: "v1", Resource: "bindings"}: {},
|
||||
schema.GroupVersionResource{Group: "", Version: "v1", Resource: "componentstatuses"}: {},
|
||||
schema.GroupVersionResource{Group: "", Version: "v1", Resource: "events"}: {},
|
||||
schema.GroupVersionResource{Group: "authentication.k8s.io", Version: "v1beta1", Resource: "tokenreviews"}: {},
|
||||
schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "subjectaccessreviews"}: {},
|
||||
schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "selfsubjectaccessreviews"}: {},
|
||||
schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "localsubjectaccessreviews"}: {},
|
||||
schema.GroupVersionResource{Group: "apiregistration.k8s.io", Version: "v1alpha1", Resource: "apiservices"}: {},
|
||||
{Group: "extensions", Version: "v1beta1", Resource: "replicationcontrollers"}: {},
|
||||
{Group: "", Version: "v1", Resource: "bindings"}: {},
|
||||
{Group: "", Version: "v1", Resource: "componentstatuses"}: {},
|
||||
{Group: "", Version: "v1", Resource: "events"}: {},
|
||||
{Group: "authentication.k8s.io", Version: "v1beta1", Resource: "tokenreviews"}: {},
|
||||
{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "subjectaccessreviews"}: {},
|
||||
{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "selfsubjectaccessreviews"}: {},
|
||||
{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "localsubjectaccessreviews"}: {},
|
||||
{Group: "apiregistration.k8s.io", Version: "v1alpha1", Resource: "apiservices"}: {},
|
||||
}
|
||||
|
||||
func (gb *GraphBuilder) enqueueChanges(e *event) {
|
||||
|
||||
Reference in New Issue
Block a user