Переглянути джерело

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{