Merge pull request #710 from surajnarwade/sanity_check_fix

Updated code with go lint result
This commit is contained in:
Charlie Drage
2017-07-14 14:46:27 -04:00
committed by GitHub
6 changed files with 13 additions and 7 deletions
+2 -2
View File
@@ -562,7 +562,7 @@ func (k *Kubernetes) VolumesFrom(objects *[]runtime.Object, komposeObject kobjec
return nil
}
//Ensure the kubernetes objects are in a consistent order
// SortedKeys Ensure the kubernetes objects are in a consistent order
func SortedKeys(komposeObject kobject.KomposeObject) []string {
var sortedKeys []string
for name := range komposeObject.ServiceConfigs {
@@ -572,7 +572,7 @@ func SortedKeys(komposeObject kobject.KomposeObject) []string {
return sortedKeys
}
//converts duration string to *int64 in seconds
// DurationStrToSecondsInt converts duration string to *int64 in seconds
func DurationStrToSecondsInt(s string) (*int64, error) {
if s == "" {
return nil, nil
+1 -1
View File
@@ -61,7 +61,7 @@ type Kubernetes struct {
// used when undeploying resources from kubernetes
const TIMEOUT = 300
//default size of Persistent Volume Claim
// PVCRequestSize (Persistent Volume Claim) has default size
const PVCRequestSize = "100Mi"
// CheckUnsupportedKey checks if given komposeObject contains
+4 -1
View File
@@ -33,6 +33,7 @@ import (
"k8s.io/kubernetes/pkg/api"
)
// Selector used as labels and selector
const Selector = "io.kompose.service"
// CreateOutFile creates the file to write to if --out is specified
@@ -155,7 +156,7 @@ func formatProviderName(provider string) string {
return provider
}
// Sort struct
// EnvSort struct
type EnvSort []api.EnvVar
// returns the number of elements in the collection.
@@ -189,6 +190,7 @@ func GetComposeFileDir(inputFiles []string) (string, error) {
return filepath.Dir(inputFile), nil
}
//BuildDockerImage builds docker image
func BuildDockerImage(service kobject.ServiceConfig, name string, relativePath string) error {
// First, let's figure out the relative path of the Dockerfile!
@@ -223,6 +225,7 @@ func BuildDockerImage(service kobject.ServiceConfig, name string, relativePath s
return nil
}
// PushDockerImage pushes docker image
func PushDockerImage(service kobject.ServiceConfig, serviceName string) error {
log.Debugf("Pushing Docker image '%s'", service.Image)