mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-10 04:54:03 -08:00
26 lines
443 B
Go
26 lines
443 B
Go
|
package main
|
||
|
|
||
|
type text struct {
|
||
|
props *properties
|
||
|
env environmentInfo
|
||
|
}
|
||
|
|
||
|
const (
|
||
|
//TextProperty represents text to write
|
||
|
TextProperty Property = "text"
|
||
|
)
|
||
|
|
||
|
func (t *text) enabled() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
func (t *text) string() string {
|
||
|
textProperty := t.props.getString(TextProperty, "!!text property not defined!!")
|
||
|
return textProperty
|
||
|
}
|
||
|
|
||
|
func (t *text) init(props *properties, env environmentInfo) {
|
||
|
t.props = props
|
||
|
t.env = env
|
||
|
}
|