text/shaper: add fmt.Stringer() implementation for Style

Signed-off-by: Walter Werner SCHNEIDER <contact@schnwalter.eu>
This commit is contained in:
Walter Werner SCHNEIDER
2021-09-02 22:06:21 +03:00
committed by Elias Naur
parent 86b685abe5
commit a5625031a4
+11
View File
@@ -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")
}
}