Remove redundant strings.ToLower()

Removes the redundant strings.ToLower commands for GlobalProvider in
up.go, convert.go and down.go
This commit is contained in:
Charlie Drage
2017-09-06 13:41:56 -04:00
parent 36652f6d81
commit a930ce266f
3 changed files with 5 additions and 15 deletions
+2 -4
View File
@@ -18,7 +18,6 @@ package cmd
import (
log "github.com/Sirupsen/logrus"
"strings"
"github.com/kubernetes/kompose/pkg/app"
"github.com/kubernetes/kompose/pkg/kobject"
@@ -42,8 +41,7 @@ var upCmd = &cobra.Command{
PreRun: func(cmd *cobra.Command, args []string) {
// Check that build-config wasn't passed in with --provider=kubernetes
provider := strings.ToLower(GlobalProvider)
if provider == "kubernetes" && UpBuild == "build-config" {
if GlobalProvider == "kubernetes" && UpBuild == "build-config" {
log.Fatalf("build-config is not a valid --build parameter with provider Kubernetes")
}
@@ -52,7 +50,7 @@ var upCmd = &cobra.Command{
Build: UpBuild,
Replicas: UpReplicas,
InputFiles: GlobalFiles,
Provider: strings.ToLower(GlobalProvider),
Provider: GlobalProvider,
EmptyVols: UpEmptyVols,
Namespace: UpNamespace,
InsecureRepository: UpInsecureRepo,