فهرست منبع

registry: remove use of iota for consts

I think it's a bit more readable to just use a literal value
for these; this also prevents having to use `_` to skip zero.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 3 سال پیش
والد
کامیت
37dc2582d1
1فایلهای تغییر یافته به همراه2 افزوده شده و 3 حذف شده
  1. 2 3
      registry/types.go

+ 2 - 3
registry/types.go

@@ -45,9 +45,8 @@ func (av APIVersion) String() string {
 
 // API Version identifiers.
 const (
-	_                      = iota
-	APIVersion1 APIVersion = iota
-	APIVersion2
+	APIVersion1 APIVersion = 1
+	APIVersion2 APIVersion = 2
 )
 
 var apiVersions = map[APIVersion]string{