chore: rename os properties

This commit is contained in:
Jan De Dobbeleer 2020-10-09 12:51:22 +02:00 committed by Jan De Dobbeleer
parent 7af06ebe92
commit df739cbb84
2 changed files with 9 additions and 9 deletions

View file

@ -56,7 +56,7 @@ const (
ShellInfo SegmentType = "shell" ShellInfo SegmentType = "shell"
//Node writes which node version is currently active //Node writes which node version is currently active
Node SegmentType = "node" Node SegmentType = "node"
//OS write os specific icon //Os write os specific icon
Os SegmentType = "os" Os SegmentType = "os"
//Powerline writes it Powerline style //Powerline writes it Powerline style
Powerline SegmentStyle = "powerline" Powerline SegmentStyle = "powerline"

View file

@ -1,16 +1,16 @@
package main package main
type osInfo struct { type osInfo struct {
props *properties props *properties
env environmentInfo env environmentInfo
} }
const ( const (
//Macos the string to use for macOS //MacOS the string/icon to use for MacOS
macOS Property = "macos" MacOS Property = "macos"
//LinuxIcon the string to use for linux //Linux the string/icon to use for linux
Linux Property = "linux" Linux Property = "linux"
//WindowsIcon the icon to use for windows //Windows the string/icon to use for windows
Windows Property = "windows" Windows Property = "windows"
) )
@ -24,7 +24,7 @@ func (n *osInfo) string() string {
case "windows": case "windows":
return n.props.getString(Windows, "\uE62A") return n.props.getString(Windows, "\uE62A")
case "darwin": case "darwin":
return n.props.getString(macOS, "\uF179") return n.props.getString(MacOS, "\uF179")
case "linux": case "linux":
return n.props.getString(Linux, "\uF17C") return n.props.getString(Linux, "\uF17C")
default: default:
@ -35,4 +35,4 @@ func (n *osInfo) string() string {
func (n *osInfo) init(props *properties, env environmentInfo) { func (n *osInfo) init(props *properties, env environmentInfo) {
n.props = props n.props = props
n.env = env n.env = env
} }