From 7cbb4c1db45683a985365bba34fa862b70f84c5d Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Wed, 17 Apr 2024 11:55:59 -0400 Subject: [PATCH] Make indentation fix a private function --- command/command.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/command.go b/command/command.go index 5acfc5a170..203e33a5af 100644 --- a/command/command.go +++ b/command/command.go @@ -144,7 +144,7 @@ func loadYAMLFiles(fsys fs.FS, paths []string, format bool) (loadResults, error) } if format { - if err := FixIndentation(lr); err != nil { + if err := fixIndentation(lr); err != nil { return nil, fmt.Errorf("failed to format indentation: %w", err) } } @@ -155,8 +155,8 @@ func loadYAMLFiles(fsys fs.FS, paths []string, format bool) (loadResults, error) return r, nil } -// FixIndentation corrects the indentation for the given loadResult and edits it in-place. -func FixIndentation(f *loadResult) error { +// fixIndentation corrects the indentation for the given loadResult and edits it in-place. +func fixIndentation(f *loadResult) error { updated, err := marshalYAML(f.node) if err != nil { return fmt.Errorf("failed to marshal yaml for %s: %w", f.path, err)