From 81f6b4dcfe5019be23914b07ad4d89d0eeec3708 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sun, 12 Jul 2020 17:25:53 -0700 Subject: [PATCH] invoices: add String() method to failure resolution outcome In this commit, we add a String() method to the failure resolution outcome. Without this, logs aren't very useful as the integer version of the outcome is printed rather than the description. --- invoices/resolution_result.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/invoices/resolution_result.go b/invoices/resolution_result.go index 41da902a..b979d3ac 100644 --- a/invoices/resolution_result.go +++ b/invoices/resolution_result.go @@ -107,6 +107,11 @@ const ( ResultMppInProgress ) +// String returns a string representation of the result. +func (f FailResolutionResult) String() string { + return f.FailureString() +} + // FailureString returns a string representation of the result. // // Note: it is part of the FailureDetail interface.