Apply linter autofixes: internal/cli (refs #61)

This commit is contained in:
2026-08-07 16:53:19 +00:00
parent 40516d1263
commit 070a8a5447
15 changed files with 198 additions and 46 deletions

View File

@@ -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
}