oh-my-posh/src/segment_az_functions.go
2022-01-01 20:22:52 +01:00

29 lines
534 B
Go

package main
type azfunc struct {
language
}
func (az *azfunc) string() string {
return az.language.string()
}
func (az *azfunc) init(props Properties, env environmentInfo) {
az.language = language{
env: env,
props: props,
extensions: []string{"host.json", "local.settings.json", "function.json"},
commands: []*cmd{
{
executable: "func",
args: []string{"--version"},
regex: `(?P<version>[0-9.]+)`,
},
},
}
}
func (az *azfunc) enabled() bool {
return az.language.enabled()
}