From 3bf665f547e409727dacfa2753d5c1a381c51b55 Mon Sep 17 00:00:00 2001 From: Indradhanush Gupta Date: Thu, 2 Feb 2023 19:34:02 +0530 Subject: [PATCH] Add String method on Unified --- unified.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/unified.go b/unified.go index b7d85cf..96966b5 100644 --- a/unified.go +++ b/unified.go @@ -208,3 +208,8 @@ func (u Unified) Format(f fmt.State, r rune) { } } } + +// Helper to get the stringified diff directly. +func (u Unified) String() string { + return fmt.Sprint(u) +}