Commit c61f8141
c61f81415f28Merged
Svyatoslav Dumchenko <[email protected]> ยท 4 years ago ยท 2 files ยท ~2 modified
Description
fix linter issues
Details
- Commit
- c61f81415f28
- Parent
- 2f53f09e8f67
cmd/helmwave/main.gomodifiedView file
@@ -11,21 +11,19 @@
1111
"github.com/urfave/cli/v2"1212
)1313
14-
var (15-
commands = []*cli.Command{16-
new(action.Build).Cmd(),17-
new(action.Diff).Cmd(),18-
new(action.Up).Cmd(),19-
new(action.List).Cmd(),20-
new(action.Rollback).Cmd(),21-
new(action.Status).Cmd(),22-
new(action.Down).Cmd(),23-
new(action.Validate).Cmd(),24-
new(action.Yml).Cmd(),25-
version(),26-
completion(),27-
}28-
)14+
var commands = []*cli.Command{15+
new(action.Build).Cmd(),16+
new(action.Diff).Cmd(),17+
new(action.Up).Cmd(),18+
new(action.List).Cmd(),19+
new(action.Rollback).Cmd(),20+
new(action.Status).Cmd(),21+
new(action.Down).Cmd(),22+
new(action.Validate).Cmd(),23+
new(action.Yml).Cmd(),24+
version(),25+
completion(),26+
}2927
3028
func main() {3129
c := CreateApp()@@ -34,14 +32,14 @@
3432
3533
err := c.Run(os.Args)3634
if err != nil {37-
log.Fatal(err)35+
log.Fatal(err) //nolint:gocritic // we try to recover panics, not regural command errors3836
}3937
}4038
4139
func recoverPanic() {4240
if r := recover(); r != nil {4341
switch r.(type) {44-
case ErrCommandNotFound:42+
case CommandNotFoundError:4543
log.Error(r)4644
log.Exit(127)4745
default:@@ -56,11 +54,10 @@
5654
c.EnableBashCompletion = true5755
c.Usage = "is like docker-compose for helm"5856
c.Version = helmwave.Version59-
c.Description =60-
"This tool helps you compose your helm releases!\n" +61-
"0. $ helmwave yml\n" +62-
"1. $ helmwave build\n" +63-
"2. $ helmwave up\n"57+
c.Description = "This tool helps you compose your helm releases!\n" +58+
"0. $ helmwave yml\n" +59+
"1. $ helmwave build\n" +60+
"2. $ helmwave up\n"6461
6562
logSet := logSetup.Settings{}6663
c.Before = logSet.Run@@ -72,16 +69,16 @@
7269
return c7370
}7471
75-
type ErrCommandNotFound struct {72+
type CommandNotFoundError struct {7673
Command string7774
}7875
79-
func (e ErrCommandNotFound) Error() string {76+
func (e CommandNotFoundError) Error() string {8077
return fmt.Sprintf("๐ป Command %q not found", e.Command)8178
}8279
8380
func command404(c *cli.Context, s string) {84-
err := ErrCommandNotFound{81+
err := CommandNotFoundError{8582
Command: s,8683
}8784
panic(err)cmd/helmwave/main_test.gomodifiedView file
Loading diffโฆ