Fixes golint errors in pkg/api

This commit is contained in:
Yuki Yugui Sonoda
2014-07-08 16:08:58 +09:00
parent c25f44c137
commit 780c441d19
3 changed files with 20 additions and 13 deletions

View File

@@ -24,19 +24,20 @@ import (
)
var (
supportedManifestVersions util.StringSet = util.NewStringSet("v1beta1", "v1beta2")
supportedManifestVersions = util.NewStringSet("v1beta1", "v1beta2")
)
// Validation errors.
// ValidationErrorEnum is a type of validation error.
type ValidationErrorEnum string
// These are known errors of validation.
const (
ErrTypeInvalid ValidationErrorEnum = "invalid value"
ErrTypeNotSupported ValidationErrorEnum = "unsupported value"
ErrTypeDuplicate ValidationErrorEnum = "duplicate value"
)
// Implements the 'error' interface.
// ValidationError is an implementation of the 'error' interface, which represents an error of validation.
type ValidationError struct {
ErrorType ValidationErrorEnum
ErrorField string