Skip to content

Commit 82f3994

Browse files
OutputError: add String method
1 parent 4bdfd36 commit 82f3994

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

output.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ type OutputError struct {
137137
p *message.Printer
138138
}
139139

140+
func (k OutputError) String() string {
141+
return k.Kind.LocalizedString(k.p)
142+
}
143+
140144
func (k OutputError) MarshalJSON() ([]byte, error) {
141145
return json.Marshal(k.Kind.LocalizedString(k.p))
142146
}

0 commit comments

Comments
 (0)