From abe9ab3e5010293dc880486e2b31b5ed7205d0ff Mon Sep 17 00:00:00 2001 From: morikuni Date: Thu, 18 Apr 2024 23:16:43 +0900 Subject: [PATCH] Add String method to Message --- field.go | 4 ++++ stack.go | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) delete mode 100644 stack.go diff --git a/field.go b/field.go index 0f74667..156dedf 100644 --- a/field.go +++ b/field.go @@ -65,3 +65,7 @@ func (m Message) SetErrorField(setter FieldSetter) { func Messagef(format string, a ...any) Message { return Message(fmt.Sprintf(format, a...)) } + +func (m Message) String() string { + return string(m) +} diff --git a/stack.go b/stack.go deleted file mode 100644 index 9bdbb7b..0000000 --- a/stack.go +++ /dev/null @@ -1 +0,0 @@ -package failure