Skip to content

Commit a8a7791

Browse files
authored
Merge pull request kubernetes#95502 from suramrit/lintCorrection
Fix golint errors by adding definition comments for pkg/apis/apiserverinternal
2 parents 470c7fd + e0249c4 commit a8a7791

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

hack/.golint_failures

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ pkg/apis/abac/v1beta1
77
pkg/apis/admission
88
pkg/apis/admissionregistration/v1
99
pkg/apis/admissionregistration/v1beta1
10-
pkg/apis/apiserverinternal
1110
pkg/apis/apps/v1
1211
pkg/apis/apps/v1beta1
1312
pkg/apis/apps/v1beta2

pkg/apis/apiserverinternal/types.go

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
2424

25-
// Storage version of a specific resource.
25+
// StorageVersion of a specific resource.
2626
type StorageVersion struct {
2727
metav1.TypeMeta
2828
// The name is <group>.<resource>.
@@ -39,7 +39,7 @@ type StorageVersion struct {
3939
// StorageVersionSpec is an empty spec.
4040
type StorageVersionSpec struct{}
4141

42-
// API server instances report the versions they can decode and the version they
42+
// StorageVersionStatus API server instances report the versions they can decode and the version they
4343
// encode objects to when persisting objects in the backend.
4444
type StorageVersionStatus struct {
4545
// The reported versions per API server instance.
@@ -57,7 +57,7 @@ type StorageVersionStatus struct {
5757
Conditions []StorageVersionCondition
5858
}
5959

60-
// An API server instance reports the version it can decode and the version it
60+
// ServerStorageVersion An API server instance reports the version it can decode and the version it
6161
// encodes objects to when persisting objects in the backend.
6262
type ServerStorageVersion struct {
6363
// The ID of the reporting API server.
@@ -72,22 +72,27 @@ type ServerStorageVersion struct {
7272
DecodableVersions []string
7373
}
7474

75+
// StorageVersionConditionType Indicates the storage version condition type
7576
type StorageVersionConditionType string
7677

7778
const (
78-
// Indicates that encoding storage versions reported by all servers are equal.
79+
//AllEncodingVersionsEqual Indicates that encoding storage versions reported by all servers are equal.
7980
AllEncodingVersionsEqual StorageVersionConditionType = "AllEncodingVersionsEqual"
8081
)
8182

83+
// ConditionStatus indicates status of condition from "True", "False", or "Unknown"
8284
type ConditionStatus string
8385

8486
const (
85-
ConditionTrue ConditionStatus = "True"
86-
ConditionFalse ConditionStatus = "False"
87+
// ConditionTrue indicates condition as "True"
88+
ConditionTrue ConditionStatus = "True"
89+
// ConditionFalse indicates condition as "False"
90+
ConditionFalse ConditionStatus = "False"
91+
// ConditionUnknown indicates condition as "Unknown"
8792
ConditionUnknown ConditionStatus = "Unknown"
8893
)
8994

90-
// Describes the state of the storageVersion at a certain point.
95+
// StorageVersionCondition Describes the state of the storageVersion at a certain point.
9196
type StorageVersionCondition struct {
9297
// Type of the condition.
9398
// +optional
@@ -111,7 +116,7 @@ type StorageVersionCondition struct {
111116

112117
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
113118

114-
// A list of StorageVersions.
119+
// StorageVersionList A list of StorageVersions.
115120
type StorageVersionList struct {
116121
metav1.TypeMeta
117122
// +optional

0 commit comments

Comments
 (0)