mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-27 11:59:40 -08:00
1a5f4819e1
resolves #165
25 lines
486 B
Go
25 lines
486 B
Go
package main
|
|
|
|
type golang struct {
|
|
language *language
|
|
}
|
|
|
|
func (g *golang) string() string {
|
|
return g.language.string()
|
|
}
|
|
|
|
func (g *golang) init(props *properties, env environmentInfo) {
|
|
g.language = &language{
|
|
env: env,
|
|
props: props,
|
|
commands: []string{"go"},
|
|
versionParam: "version",
|
|
extensions: []string{"*.go", "go.mod"},
|
|
versionRegex: `go(?P<version>[0-9]+.[0-9]+.[0-9]+)`,
|
|
}
|
|
}
|
|
|
|
func (g *golang) enabled() bool {
|
|
return g.language.enabled()
|
|
}
|