diff --git a/pkg/diff/markdown.go b/pkg/diff/markdown.go index cbd263ef..f7b5cbe8 100644 --- a/pkg/diff/markdown.go +++ b/pkg/diff/markdown.go @@ -192,7 +192,7 @@ func (m *MarkdownOutput) printDiff(maxDiffMessageCharCount uint) string { if sectionsDiff.Len() == 0 { if len(m.sections) > 0 { - sectionsDiff.WriteString(fmt.Sprintf("⚠️ Changes were found but `--max-diff-length` (%d) is too small to display them. Increase the value or check the HTML output instead.", maxDiffMessageCharCount)) + fmt.Fprintf(§ionsDiff, "⚠️ Changes were found but `--max-diff-length` (%d) is too small to display them. Increase the value or check the HTML output instead.", maxDiffMessageCharCount) log.Warn().Msgf("🚨 --max-diff-length (%d) is too small to display any diff content. Increase the value or use the HTML output instead.", maxDiffMessageCharCount) } else { sectionsDiff.WriteString("No changes found") diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index ad7a972b..0a161e26 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -50,10 +50,10 @@ func CreateFolder(path string, override bool) error { return err } -var uniqueNumber uint64 +var uniqueNumber atomic.Uint64 func UniqueNumber() uint64 { - return atomic.AddUint64(&uniqueNumber, 1) + return uniqueNumber.Add(1) } func UniqueId() string {