oh-my-posh/segment_golang.go
Jan De Dobbeleer 1a5f4819e1 feat: use language config files
resolves #165
2020-11-17 19:37:09 +01:00

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()
}