From 823111c0fe2ba02f580e83bfee4f6d60980e2e00 Mon Sep 17 00:00:00 2001 From: JieJhih Jhang Date: Fri, 24 May 2019 18:45:01 +0800 Subject: [PATCH] use iota instead assign value to constants --- pkg/scheduler/framework/v1alpha1/interface.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/scheduler/framework/v1alpha1/interface.go b/pkg/scheduler/framework/v1alpha1/interface.go index 09866b9d723..1a47f3f9226 100644 --- a/pkg/scheduler/framework/v1alpha1/interface.go +++ b/pkg/scheduler/framework/v1alpha1/interface.go @@ -34,14 +34,14 @@ type Code int const ( // Success means that plugin ran correctly and found pod schedulable. // NOTE: A nil status is also considered as "Success". - Success Code = 0 + Success Code = iota // Error is used for internal plugin errors, unexpected input, etc. - Error Code = 1 + Error // Unschedulable is used when a plugin finds a pod unschedulable. // The accompanying status message should explain why the pod is unschedulable. - Unschedulable Code = 2 + Unschedulable // Wait is used when a permit plugin finds a pod scheduling should wait. - Wait Code = 3 + Wait ) // Status indicates the result of running a plugin. It consists of a code and a