Conversation
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the colors and styles per the new Figma design, refactors some names, and adds a new command that throws a long error to test error handling.
- Updated help templates and formatting across various testdata files
- Refactored error and usage styling in help.go
- Renamed theming types and added a test "throw" command in example/main.go
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| testdata/TestSetup/*/help.golden | Updated formatting and spacing of usage, commands, and flags help text |
| help.go | Refactored styling for usage, examples, and error rendering |
| fang.go | Renamed theming variable and adjusted related API |
| example/main.go | Added a new "throw" command for testing long error handling |
Comments suppressed due to low confidence (3)
help.go:96
- The error rendering now uses 'styles.ErrorText' instead of the previous 'styles.ErrorDetails'. Ensure the updated styling is reflected in the documentation and that tests verify the intended error layout.
_, _ = fmt.Fprintln(w, styles.ErrorText.Width(width()).Render(titleFirstWord(err.Error()+".")))
fang.go:24
- The theming variable has been renamed from '*Theme' to '*ColorScheme'. Make sure that all related documentation and usage examples are updated to maintain consistency in the API design.
theme *ColorScheme
example/main.go:73
- The new 'throw' command returns a very long error message for testing purposes. Consider adding a brief comment to clarify its purpose for future maintainers and reviewers.
cmd.AddCommand(&cobra.Command{
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
throwcmd to the example that always throws a long error