6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-06 13:57:56 +00:00

Fix issues found by varnamelen linter

This commit is contained in:
Grzegorz Dlugoszewski
2025-08-24 15:44:22 +02:00
parent 288a642483
commit f60cfd1e40
7 changed files with 62 additions and 57 deletions

View File

@@ -16,24 +16,24 @@ type ListCfg struct {
}
// List executes the "git list" command.
func List(c *ListCfg) error {
finder := git.NewRepoFinder(c.Root)
func List(conf *ListCfg) error {
finder := git.NewRepoFinder(conf.Root)
if err := finder.Find(); err != nil {
return err
}
statuses := finder.LoadAll(c.Fetch)
statuses := finder.LoadAll(conf.Fetch)
printables := make([]print.Printable, len(statuses))
for i := range statuses {
printables[i] = statuses[i]
}
switch c.Output {
switch conf.Output {
case cfg.OutFlat:
fmt.Print(print.NewFlatPrinter().Print(printables))
case cfg.OutTree:
fmt.Print(print.NewTreePrinter().Print(c.Root, printables))
fmt.Print(print.NewTreePrinter().Print(conf.Root, printables))
case cfg.OutDump:
fmt.Print(print.NewDumpPrinter().Print(printables))
default: