fix golint errors

This commit is contained in:
Tomas Kral
2017-01-05 10:31:11 +01:00
parent 502157a078
commit 4f176b847e
19 changed files with 159 additions and 114 deletions
+21 -9
View File
@@ -25,16 +25,28 @@ import (
"github.com/spf13/viper"
)
// TODO: comment
var (
ConvertSource, ConvertOut, ConvertBuildRepo, ConvertBuildBranch string
ConvertChart, ConvertDeployment, ConvertDaemonSet bool
ConvertReplicationController, ConvertYaml, ConvertStdout, ConvertJson bool
ConvertEmptyVols, ConvertDeploymentConfig, ConvertBuildConfig bool
ConvertReplicas int
ConvertOpt kobject.ConvertOptions
ConvertSource string
ConvertOut string
ConvertBuildRepo string
ConvertBuildBranch string
ConvertChart bool
ConvertDeployment bool
ConvertDaemonSet bool
ConvertReplicationController bool
ConvertYaml bool
ConvertJSON bool
ConvertStdout bool
ConvertEmptyVols bool
ConvertDeploymentConfig bool
ConvertBuildConfig bool
ConvertReplicas int
ConvertOpt kobject.ConvertOptions
)
var ConvertProvider string = GlobalProvider
// ConvertProvider TODO: comment
var ConvertProvider = GlobalProvider
var convertCmd = &cobra.Command{
Use: "convert [file]",
@@ -46,7 +58,7 @@ var convertCmd = &cobra.Command{
ToStdout: ConvertStdout,
CreateChart: ConvertChart,
GenerateYaml: ConvertYaml,
GenerateJson: ConvertJson,
GenerateJSON: ConvertJSON,
Replicas: ConvertReplicas,
InputFiles: GlobalFiles,
OutFile: ConvertOut,
@@ -96,7 +108,7 @@ func init() {
convertCmd.Flags().BoolVarP(&ConvertYaml, "yaml", "y", false, "Generate resource files into YAML format")
convertCmd.Flags().MarkDeprecated("yaml", "YAML is the default format now.")
convertCmd.Flags().MarkShorthandDeprecated("y", "YAML is the default format now.")
convertCmd.Flags().BoolVarP(&ConvertJson, "json", "j", false, "Generate resource files into JSON format")
convertCmd.Flags().BoolVarP(&ConvertJSON, "json", "j", false, "Generate resource files into JSON format")
convertCmd.Flags().BoolVar(&ConvertStdout, "stdout", false, "Print converted objects to stdout")
convertCmd.Flags().BoolVar(&ConvertEmptyVols, "emptyvols", false, "Use Empty Volumes. Do not generate PVCs")
convertCmd.Flags().StringVarP(&ConvertOut, "out", "o", "", "Specify a file name to save objects to")
+1
View File
@@ -24,6 +24,7 @@ import (
"github.com/spf13/cobra"
)
// TODO: comment
var (
DownReplicas int
DownEmptyVols bool
+9 -3
View File
@@ -39,12 +39,17 @@ func (errorOnWarningHook) Fire(entry *logrus.Entry) error {
return nil
}
// TODO: comment
var (
GlobalBundle, GlobalProvider string
GlobalVerbose, GlobalSuppressWarnings, GlobalErrorOnWarning bool
GlobalFiles []string
GlobalBundle string
GlobalProvider string
GlobalVerbose bool
GlobalSuppressWarnings bool
GlobalErrorOnWarning bool
GlobalFiles []string
)
// RootCmd root level flags and commands
var RootCmd = &cobra.Command{
Use: "kompose",
Short: "A tool helping Docker Compose users move to Kubernetes",
@@ -76,6 +81,7 @@ var RootCmd = &cobra.Command{
},
}
// Execute TODO: comment
func Execute() {
if err := RootCmd.Execute(); err != nil {
fmt.Println(err)
+1
View File
@@ -24,6 +24,7 @@ import (
"github.com/spf13/cobra"
)
// TODO: comment
var (
UpReplicas int
UpEmptyVols bool
+3 -1
View File
@@ -23,7 +23,9 @@ import (
)
var (
VERSION = "0.1.2"
// VERSION is version number that wil be displayed when running ./kompose version
VERSION = "0.1.2"
// GITCOMMIT is hash of the commit that wil be displayed when running ./kompose version
GITCOMMIT = "HEAD"
)