Apply linter autofixes: internal/cli (refs #61)
This commit is contained in:
@@ -19,13 +19,15 @@ func CLIEntry() {
|
||||
if len(short) > 12 {
|
||||
short = short[:12]
|
||||
}
|
||||
|
||||
writeStartupBanner(ui.New(os.Stdout), time.Now().UTC(), short)
|
||||
}
|
||||
|
||||
rootCmd := NewRootCommand()
|
||||
rootCmd.SilenceErrors = true
|
||||
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
err := rootCmd.Execute()
|
||||
if err != nil {
|
||||
ReportError("%s", err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -48,10 +50,12 @@ func bannerSuppressedInArgs(args []string) bool {
|
||||
if a == "--" {
|
||||
return false
|
||||
}
|
||||
|
||||
switch a {
|
||||
case "--quiet", "-q", "--cron":
|
||||
return true
|
||||
}
|
||||
|
||||
if strings.HasPrefix(a, "--quiet=") || strings.HasPrefix(a, "--cron=") {
|
||||
return true
|
||||
}
|
||||
@@ -64,5 +68,6 @@ func bannerSuppressedInArgs(args []string) bool {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user