diff --git a/pkg/apis/discovery/v1alpha1/clusterducktype_defaults_test.go b/pkg/apis/discovery/v1alpha1/clusterducktype_defaults_test.go index 5f91910c2..222d10c89 100644 --- a/pkg/apis/discovery/v1alpha1/clusterducktype_defaults_test.go +++ b/pkg/apis/discovery/v1alpha1/clusterducktype_defaults_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/apis/discovery/v1alpha1/clusterducktype_lifecycle_test.go b/pkg/apis/discovery/v1alpha1/clusterducktype_lifecycle_test.go index ce191ea80..4cd06b580 100644 --- a/pkg/apis/discovery/v1alpha1/clusterducktype_lifecycle_test.go +++ b/pkg/apis/discovery/v1alpha1/clusterducktype_lifecycle_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/apis/discovery/v1alpha1/clusterducktype_types_test.go b/pkg/apis/discovery/v1alpha1/clusterducktype_types_test.go index e0490bbbb..d176466a9 100644 --- a/pkg/apis/discovery/v1alpha1/clusterducktype_types_test.go +++ b/pkg/apis/discovery/v1alpha1/clusterducktype_types_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/apis/discovery/v1alpha1/clusterducktype_validation_test.go b/pkg/apis/discovery/v1alpha1/clusterducktype_validation_test.go index cef0c91c3..9d7ae137f 100644 --- a/pkg/apis/discovery/v1alpha1/clusterducktype_validation_test.go +++ b/pkg/apis/discovery/v1alpha1/clusterducktype_validation_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/apis/discovery/v1alpha1/register_test.go b/pkg/apis/discovery/v1alpha1/register_test.go index 1a0bb1eb3..978ded55a 100644 --- a/pkg/apis/discovery/v1alpha1/register_test.go +++ b/pkg/apis/discovery/v1alpha1/register_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/collection/ducks.go b/pkg/collection/ducks.go index 074dcc0ac..df42c3902 100644 --- a/pkg/collection/ducks.go +++ b/pkg/collection/ducks.go @@ -257,7 +257,8 @@ func (dh *duckHunter) Ducks() map[string][]v1alpha1.ResourceMeta { } // setAccessibleViaClusterRole sets the AccessibleViaClusterRole flag on each duck if -// the ClusterRole can preform the expected verbs on the duck +// +// the ClusterRole can preform the expected verbs on the duck func setAccessibleViaClusterRole(metas []v1alpha1.ResourceMeta, accessibleGroupResources map[string]bool, kindToResource map[string]string) { for index, meta := range metas { // TODO: it would be nice if ResourceMeta had a version-free unique hash to do this. @@ -333,8 +334,9 @@ func version(meta v1alpha1.ResourceMeta) string { // accessibleGroupResources finds the rules in the ClusterRole that satisfy the expectedVerbs // and returns a map of -// key: apiGroup + ":" + resource -// value: true if Rule satisfies the expectedVerbs, false otherwise +// +// key: apiGroup + ":" + resource +// value: true if Rule satisfies the expectedVerbs, false otherwise func accessibleGroupResources(expectedVerbs []string, clusterRole *rbacv1.ClusterRole) map[string]bool { groupResources := map[string]bool{} if clusterRole == nil { @@ -355,8 +357,9 @@ func accessibleGroupResources(expectedVerbs []string, clusterRole *rbacv1.Cluste } // Returns true if first is a fully contained subset of second -// returns false otherwise -// supports "*" as a wildcard +// +// returns false otherwise +// supports "*" as a wildcard func isSubset(first, second []string) bool { set := map[string]bool{} for _, value := range second { diff --git a/pkg/reconciler/clusterducktype/clusterducktype.go b/pkg/reconciler/clusterducktype/clusterducktype.go index 233d6ba69..6a2de7ef7 100644 --- a/pkg/reconciler/clusterducktype/clusterducktype.go +++ b/pkg/reconciler/clusterducktype/clusterducktype.go @@ -103,8 +103,9 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, dt *v1alpha1.ClusterDuck } // getAggregatingClusterRole fetches the ClusterRole specified by Spec.Role.RoleRef -// if not set, it will default to using the first LabelSelector in Spec.Selectors to -// match any ClusterRole with a matching AggregationRule +// +// if not set, it will default to using the first LabelSelector in Spec.Selectors to +// match any ClusterRole with a matching AggregationRule func (r *Reconciler) getAggregatingClusterRole(ctx context.Context, dt *v1alpha1.ClusterDuckType) (*rbacv1.ClusterRole, error) { if dt.Spec.Role != nil && dt.Spec.Role.RoleRef != nil { return r.client.RbacV1().ClusterRoles().Get(ctx, dt.Spec.Role.RoleRef.Name, metav1.GetOptions{})