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

@ -104,6 +104,7 @@ type EnvVar struct {
Value string `yaml:"value,omitempty" json:"value,omitempty"`
}
// HTTPGetProbe describes a liveness probe based on HTTP Get requests.
type HTTPGetProbe struct {
// Path to access on the http server
Path string `yaml:"path,omitempty" json:"path,omitempty"`
@ -113,6 +114,7 @@ type HTTPGetProbe struct {
Host string `yaml:"host,omitempty" json:"host,omitempty"`
}
// LivenessProbe describes a liveness probe to be examined to the container.
type LivenessProbe struct {
Enabled bool `yaml:"enabled,omitempty" json:"enabled,omitempty"`
// Type of liveness probe. Current legal values "http"

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