reduce usages of globalOptions variable

This commit is contained in:
Michael Eischer
2025-10-03 18:22:42 +02:00
parent e4395a9d73
commit 6bd85d2412
18 changed files with 58 additions and 62 deletions
+1 -1
View File
@@ -171,7 +171,7 @@ func runStats(ctx context.Context, opts StatsOptions, gopts GlobalOptions, args
}
if gopts.JSON {
err = json.NewEncoder(globalOptions.stdout).Encode(stats)
err = json.NewEncoder(gopts.stdout).Encode(stats)
if err != nil {
return fmt.Errorf("encoding output: %v", err)
}