6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-07 18:09:18 +00:00

Fix issues found by goerrcheck linter

This commit is contained in:
Grzegorz Dlugoszewski
2025-08-24 16:33:15 +02:00
parent 599643892b
commit 1e1584ba33
6 changed files with 35 additions and 16 deletions

View File

@@ -28,9 +28,9 @@ func newListCommand() *cobra.Command {
cmd.PersistentFlags().BoolP("help", "h", false, "Print this help and exit.")
cmd.PersistentFlags().BoolP("version", "v", false, "Print version and exit.")
viper.BindPFlag(cfg.KeyFetch, cmd.PersistentFlags().Lookup(cfg.KeyFetch))
viper.BindPFlag(cfg.KeyOutput, cmd.PersistentFlags().Lookup(cfg.KeyOutput))
viper.BindPFlag(cfg.KeyReposRoot, cmd.PersistentFlags().Lookup(cfg.KeyReposRoot))
if err := viper.BindPFlags(cmd.PersistentFlags()); err != nil {
panic(fmt.Sprintf("failed to bind flags: %v", err))
}
return cmd
}