1
0
mirror of https://github.com/mum4k/termdash.git synced 2025-04-27 13:48:49 +08:00
termdash/linestyle/linestyle.go

38 lines
881 B
Go
Raw Normal View History

// Package linestyle defines various line styles.
package linestyle
// LineStyle defines the supported line styles.Q
type LineStyle int
// String implements fmt.Stringer()
func (ls LineStyle) String() string {
if n, ok := lineStyleNames[ls]; ok {
return n
}
return "LineStyleUnknown"
}
// lineStyleNames maps LineStyle values to human readable names.
var lineStyleNames = map[LineStyle]string{
2019-02-24 01:51:50 -05:00
None: "LineStyleNone",
Light: "LineStyleLight",
Double: "LineStyleDouble",
Round: "LineStyleRound",
}
// Supported line styles.
// See https://en.wikipedia.org/wiki/Box-drawing_character.
const (
2019-02-24 01:51:50 -05:00
// None indicates that no line should be present.
None LineStyle = iota
2019-02-24 01:51:50 -05:00
// Light is line style using the '─' characters.
Light
// Double is line style using the '═' characters.
Double
// Round is line style using the rounded corners '╭' characters.
Round
)