go-chart
go-chart copied to clipboard
Zero data range bar chart now returns custom error
Previously, in the case of no range between the data values for bar charts,
fmt.Errorf
was called (without format arguments), making the resulting
error difficult to compare by downstream users. This has been replaced
with a custom error, and its test updated.
The testutil
package does not appear to have a function allowing
assertion using errors.Is
and therefore the errors.Is
check is
performed in the test itself.
If this assertion would be preferred as an extension of the testutil
package,
I would be happy to make this change.