Skip to content

Commit a2b50cd

Browse files
authored
Merge pull request kubernetes#77033 from guineveresaenger/guin-lint
Remove golint failures from pkg/apis/admissionregistration
2 parents ffd5d1a + fa0c81c commit a2b50cd

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

hack/.golint_failures

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ cmd/kube-controller-manager/app
44
cmd/kubeadm/app/apis/kubeadm/v1beta1
55
pkg/apis/abac/latest
66
pkg/apis/admission
7-
pkg/apis/admissionregistration
87
pkg/apis/admissionregistration/v1beta1
98
pkg/apis/admissionregistration/validation
109
pkg/apis/apps

pkg/apis/admissionregistration/register.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"k8s.io/apimachinery/pkg/runtime/schema"
2222
)
2323

24+
// GroupName is the name used for this API group
2425
const GroupName = "admissionregistration.k8s.io"
2526

2627
// SchemeGroupVersion is group version used to register these objects
@@ -37,8 +38,10 @@ func Resource(resource string) schema.GroupResource {
3738
}
3839

3940
var (
41+
// SchemeBuilder is the scheme builder with scheme init functions to run for this API package
4042
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
41-
AddToScheme = SchemeBuilder.AddToScheme
43+
// AddToScheme is a global function that registers this API group & version to a scheme
44+
AddToScheme = SchemeBuilder.AddToScheme
4245
)
4346

4447
// Adds the list of known types to scheme.

pkg/apis/admissionregistration/types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ type Rule struct {
6363
Scope *ScopeType
6464
}
6565

66+
// ScopeType specifies the type of scope being used
6667
type ScopeType string
6768

6869
const (
@@ -75,6 +76,7 @@ const (
7576
AllScopes ScopeType = "*"
7677
)
7778

79+
// FailurePolicyType specifies the type of failure policy
7880
type FailurePolicyType string
7981

8082
const (
@@ -84,6 +86,7 @@ const (
8486
Fail FailurePolicyType = "Fail"
8587
)
8688

89+
// SideEffectClass denotes the type of side effects resulting from calling the webhook
8790
type SideEffectClass string
8891

8992
const (
@@ -263,6 +266,7 @@ type RuleWithOperations struct {
263266
Rule
264267
}
265268

269+
// OperationType specifies what type of operation the admission hook cares about.
266270
type OperationType string
267271

268272
// The constants should be kept in sync with those defined in k8s.io/kubernetes/pkg/admission/interface.go.

0 commit comments

Comments
 (0)