influxdata / influxdata/influx-cli
Clean up `TemplateSummaryError` error formatting
- Dominant language
- Go
- Stars
- 75
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
In `api/Error.go`, we are using `\n` for error formatting in a few places, when errors are usually expected to be single line return values. For example here: https://github.com/influxdata/influx-cli/blob/041ebf65e336632f2fe4028396f5574238b6b28b/api/error.go#L121 (this code has changed very slightly since this permalink, but the result is the same).
@lesam suggested using a tool like https://github.com/hashicorp/go-multierror instead to clean this up
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in api/Error.go, especially the TemplateSummaryError formatting referenced by the issue, and inspect the other places using \n in errors. Review whether github.com/hashicorp/go-multierror fits the cleanup; done means error returns are single-line or otherwise consistently formatted without the current newline behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100