Skip to content

Commit 84b814f

Browse files
committed
auto-coder: improve console success message documentation
- Improved documentation for the Success function to clarify its purpose and behavior - Enhanced documentation for the Successf function to better describe its usage and formatting - Added explicit guidance on when to use these functions for user feedback - Made documentation more precise and consistent with Go conventions Signed-off-by: codiing-hui <wecoding@yeah.net>
1 parent 6be9c91 commit 84b814f

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

internal/ui/console/success.go

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,28 @@ var successStyle = lipgloss.NewStyle().
1111
PaddingTop(1).
1212
Foreground(lipgloss.Color("2"))
1313

14-
// Success prints the given text with a success style (green color and bold).
15-
// It adds top padding and automatically appends a newline.
14+
// Success prints styled success message to standard output.
15+
// The message is rendered in bold green text with top padding and automatically
16+
// includes a trailing newline.
17+
//
18+
// Use this for indicating successful operations to users.
19+
//
1620
// Example:
17-
// console.Success("Operation completed successfully")
21+
//
22+
// console.Success("Operation completed successfully")
1823
func Success(text string) {
1924
fmt.Println(successStyle.Render(text))
2025
}
2126

22-
// Successf prints formatted text with a success style (green color and bold).
23-
// It adds top padding and automatically appends a newline.
24-
// The format string follows fmt.Printf conventions.
27+
// Successf prints a formatted success message to standard output.
28+
// The message is rendered in bold green text with top padding and automatically
29+
// includes a trailing newline. Formatting follows fmt.Printf conventions.
30+
//
31+
// Use this for indicating parameterized successful operations to users.
32+
//
2533
// Example:
26-
// console.Successf("Processed %d items successfully", count)
34+
//
35+
// console.Successf("Processed %d items successfully", count)
2736
func Successf(format string, args ...interface{}) {
2837
fmt.Println(successStyle.Render(fmt.Sprintf(format, args...)))
2938
}

0 commit comments

Comments
 (0)