include os and arch in
This commit is contained in:
@ -237,14 +237,8 @@ func Copy(src, dst string) error {
|
||||
}
|
||||
|
||||
func clientFile() string {
|
||||
goos := os.Getenv("GOOS")
|
||||
goarch := os.Getenv("GOARCH")
|
||||
r := "client"
|
||||
if goos != "" {
|
||||
r += "-" + goos
|
||||
}
|
||||
if goarch != "" {
|
||||
r += "-" + goarch
|
||||
}
|
||||
r += operatingSystem()
|
||||
r += architecture()
|
||||
return r + ".yaml"
|
||||
}
|
||||
|
@ -319,15 +319,26 @@ func (pc *PluginConfig) Save() {
|
||||
ioutil.WriteFile(pluginFile(), bytes, 0644)
|
||||
}
|
||||
|
||||
func pluginFile() string {
|
||||
goos := os.Getenv("GOOS")
|
||||
func architecture() string {
|
||||
goarch := os.Getenv("GOARCH")
|
||||
r := "plugin"
|
||||
if goos != "" {
|
||||
r += "-" + goos
|
||||
}
|
||||
r := ""
|
||||
if goarch != "" {
|
||||
r += "-" + goarch
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func operatingSystem() string {
|
||||
goos := os.Getenv("GOOS")
|
||||
r := ""
|
||||
if goos != "" {
|
||||
r += "-" + goos
|
||||
}
|
||||
return r
|
||||
}
|
||||
func pluginFile() string {
|
||||
r := "plugin"
|
||||
r += operatingSystem()
|
||||
r += architecture()
|
||||
return r + ".yaml"
|
||||
}
|
||||
|
Reference in New Issue
Block a user