Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix golint failures of pkg/apis/autoscaling #76778

Merged
merged 1 commit into from
Apr 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion hack/.golint_failures
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ pkg/apis/authentication/v1
pkg/apis/authorization
pkg/apis/authorization/v1
pkg/apis/authorization/validation
pkg/apis/autoscaling
pkg/apis/autoscaling/v1
pkg/apis/autoscaling/v2beta1
pkg/apis/autoscaling/v2beta2
Expand Down
4 changes: 3 additions & 1 deletion pkg/apis/autoscaling/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ func Resource(resource string) schema.GroupResource {
}

var (
// SchemeBuilder points to a list of functions added to Scheme.
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
AddToScheme = SchemeBuilder.AddToScheme
// AddToScheme applies all the stored functions to the scheme.
AddToScheme = SchemeBuilder.AddToScheme
)

// Adds the list of known types to the given scheme.
Expand Down
8 changes: 6 additions & 2 deletions pkg/apis/autoscaling/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,11 @@ type MetricTarget struct {
type MetricTargetType string

var (
UtilizationMetricType MetricTargetType = "Utilization"
ValueMetricType MetricTargetType = "Value"
// UtilizationMetricType is a possible value for MetricTarget.Type.
UtilizationMetricType MetricTargetType = "Utilization"
// ValueMetricType is a possible value for MetricTarget.Type.
ValueMetricType MetricTargetType = "Value"
// AverageValueMetricType is a possible value for MetricTarget.Type.
AverageValueMetricType MetricTargetType = "AverageValue"
)

Expand Down Expand Up @@ -373,6 +376,7 @@ type ExternalMetricStatus struct {
Current MetricValueStatus
}

// MetricValueStatus indicates the current value of a metric.
type MetricValueStatus struct {
Value *resource.Quantity
AverageValue *resource.Quantity
Expand Down