2020-10-22 04:47:42 -07:00
|
|
|
package main
|
|
|
|
|
|
|
|
type golang struct {
|
2020-11-14 11:04:04 -08:00
|
|
|
language *language
|
2020-10-22 04:47:42 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
func (g *golang) string() string {
|
2020-11-14 11:04:04 -08:00
|
|
|
return g.language.string()
|
2020-10-22 04:47:42 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
func (g *golang) init(props *properties, env environmentInfo) {
|
2020-11-14 11:04:04 -08:00
|
|
|
g.language = &language{
|
|
|
|
env: env,
|
|
|
|
props: props,
|
|
|
|
commands: []string{"go"},
|
|
|
|
versionParam: "version",
|
2020-11-17 09:59:08 -08:00
|
|
|
extensions: []string{"*.go", "go.mod"},
|
2020-11-14 11:04:04 -08:00
|
|
|
versionRegex: `go(?P<version>[0-9]+.[0-9]+.[0-9]+)`,
|
|
|
|
}
|
2020-10-22 04:47:42 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
func (g *golang) enabled() bool {
|
2020-11-14 11:04:04 -08:00
|
|
|
return g.language.enabled()
|
2020-10-22 04:47:42 -07:00
|
|
|
}
|