mirror of
https://github.com/kairos-io/kairos-sdk.git
synced 2025-09-08 02:29:21 +00:00
Allow setting the platform of the image to download (#15)
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"os/signal"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/denisbrodbeck/machineid"
|
||||
@@ -246,3 +247,8 @@ func GetInterfaceIP(in string) string {
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// GetCurrentPlatform returns the current platform in docker style `linux/amd64` for use with image utils
|
||||
func GetCurrentPlatform() string {
|
||||
return fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH)
|
||||
}
|
||||
|
Reference in New Issue
Block a user