Add String() to framework status

Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
kerthcet
2023-11-01 17:01:36 +08:00
parent d038b65fee
commit fade7463cd
2 changed files with 5 additions and 1 deletions

View File

@@ -287,6 +287,10 @@ func (s *Status) Equal(x *Status) bool {
return cmp.Equal(s.plugin, x.plugin)
}
func (s *Status) String() string {
return s.Message()
}
// NewStatus makes a Status out of the given arguments and returns its pointer.
func NewStatus(code Code, reasons ...string) *Status {
s := &Status{