oh-my-posh/src/segment_az_functions.go

29 lines
541 B
Go
Raw Normal View History

2021-04-02 10:36:50 -07:00
package main
type azfunc struct {
language *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"},
2021-04-02 10:36:50 -07:00
commands: []*cmd{
{
executable: "func",
args: []string{"--version"},
regex: `(?P<version>.+)`,
},
},
}
}
func (az *azfunc) enabled() bool {
return az.language.enabled()
}