use iota instead assign value to constants

This commit is contained in:
JieJhih Jhang 2019-05-24 18:45:01 +08:00
parent 4884873160
commit 823111c0fe

View File

@ -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