1
1
mirror of https://github.com/nboughton/dotfiles synced 2024-11-22 14:51:56 +01:00

return error from json write

This commit is contained in:
Nick Boughton 2020-12-09 22:04:24 +00:00
parent 92c9d95cf0
commit 4700a00667

@ -19,8 +19,8 @@ type JSONOutput struct {
Percentage int `json:"percentage,omitempty"`
}
func (j JSONOutput) Write(o io.Writer) {
json.NewEncoder(o).Encode(j)
func (j JSONOutput) Write(o io.Writer) error {
return json.NewEncoder(o).Encode(j)
}
// Module wraps summary and json data