Fixes golint errors in pkg/api

This commit is contained in:
Yuki Sonoda (Yugui)
2014-07-10 20:46:35 +09:00
parent 0748ac39e8
commit 6914681ed0
2 changed files with 6 additions and 4 deletions

View File

@@ -64,7 +64,7 @@ func makeNotFoundError(field string, value interface{}) ValidationError {
}
// A helper for accumulating errors. This could be moved to util if anyone else needs it.
type errorList []error;
type errorList []error
func (list *errorList) Append(errs ...error) {
*list = append(*list, errs...)
@@ -87,7 +87,7 @@ func validateVolumes(volumes []Volume) (util.StringSet, errorList) {
return allNames, allErrs
}
var supportedPortProtocols util.StringSet = util.NewStringSet("TCP", "UDP")
var supportedPortProtocols = util.NewStringSet("TCP", "UDP")
func validatePorts(ports []Port) errorList {
allErrs := errorList{}
@@ -219,10 +219,10 @@ func validateContainers(containers []Container, volumes util.StringSet) errorLis
// every Port.HostPort across the whole pod must be unique.
allErrs.Append(checkHostPortConflicts(containers)...)
return allErrs;
return allErrs
}
var supportedManifestVersions util.StringSet = util.NewStringSet("v1beta1", "v1beta2")
var supportedManifestVersions = util.NewStringSet("v1beta1", "v1beta2")
// ValidateManifest tests that the specified ContainerManifest has valid data.
// This includes checking formatting and uniqueness. It also canonicalizes the