From a5625031a47c5b716dc8722c45727b6920e5db27 Mon Sep 17 00:00:00 2001 From: Walter Werner SCHNEIDER Date: Thu, 2 Sep 2021 22:06:21 +0300 Subject: [PATCH] text/shaper: add fmt.Stringer() implementation for Style Signed-off-by: Walter Werner SCHNEIDER --- text/text.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/text/text.go b/text/text.go index 0ac4651e..2a375b44 100644 --- a/text/text.go +++ b/text/text.go @@ -103,3 +103,14 @@ func (a Alignment) String() string { panic("invalid Alignment") } } + +func (s Style) String() string { + switch s { + case Regular: + return "Regular" + case Italic: + return "Italic" + default: + panic("invalid Style") + } +}