1
0
Fork 0
mirror of https://github.com/diamondburned/cchat.git synced 2025-07-04 00:56:21 +00:00

Added rich.Empty

This commit adds rich.Empty for convenience. It describes an empty text
segment.
This commit is contained in:
diamondburned 2020-09-05 10:51:02 -07:00 committed by diamondburned
parent cd018ef8f9
commit 4239dc47c4

View file

@ -7,6 +7,9 @@ type Rich struct {
Segments []Segment
}
// Empty describes an empty rich text segment with no formatting.
var Empty = Rich{}
// Plain creates a rich text with no formatting.
func Plain(text string) Rich {
return Rich{Content: text}