add support for golangci-lint (#1373)

This commit is contained in:
Rémy Léone
2021-04-07 11:10:56 +08:00
committed by GitHub
parent d1e538e2d4
commit 395d99fb7d
24 changed files with 52 additions and 134 deletions
+2 -4
View File
@@ -36,13 +36,12 @@ Will load the shell completion code.
// Generate the appropriate autocompletion file
func Generate(cmd *cobra.Command, args []string) error {
// Check the passed in arguments
if len(args) == 0 {
return fmt.Errorf("Shell not specified. ex. kompose completion [bash|zsh]")
return fmt.Errorf("shell not specified. ex. kompose completion [bash|zsh]")
}
if len(args) > 1 {
return fmt.Errorf("Too many arguments. Expected only the shell type. ex. kompose completion [bash|zsh]")
return fmt.Errorf("too many arguments. Expected only the shell type. ex. kompose completion [bash|zsh]")
}
shell := args[0]
@@ -70,7 +69,6 @@ func init() {
in order to generate ZSH completion support.
*/
func runCompletionZsh(out io.Writer, kompose *cobra.Command) error {
zshInitialization := `
__kompose_bash_source() {
alias shopt=':'
-1
View File
@@ -108,7 +108,6 @@ var convertCmd = &cobra.Command{
}
func init() {
// Automatically grab environment variables
viper.AutomaticEnv()