Documentation
¶
Index ¶
- func AssertKrunkit() error
- func AssertQemuImg() error
- func CleanPath(location string) (string, error)
- func HomeDir() string
- func HostIPAddresses() []net.IP
- func IsMx(x int) bool
- func MacOS() bool
- func MacOS13OrNewer() bool
- func MacOS13OrNewerOnArm() bool
- func MacOS15OrNewer() bool
- func MacOSNestedVirtualizationSupported() bool
- func ParseTemplate(body string, values any) ([]byte, error)
- func RandomAvailablePort() int
- func RosettaRunning() bool
- func RouteExists(subnet string) bool
- func ShellSplit(cmd string) []string
- func SubnetAvailable(subnet string) bool
- func WriteTemplate(body string, file string, values any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertKrunkit ¶ added in v0.10.0
func AssertKrunkit() error
AssertKrunkit checks if krunkit is available.
func AssertQemuImg ¶ added in v0.8.0
func AssertQemuImg() error
AssertQemuImg checks if qemu-img is available.
func CleanPath ¶ added in v0.4.5
CleanPath returns the absolute path to the mount location. If location is an empty string, nothing is done.
func HostIPAddresses ¶ added in v0.7.1
HostIPAddresses returns all IPv4 addresses on the host.
func IsMx ¶ added in v0.8.1
IsMx returns if the current device is an Apple Silicon Mx device where x is the number e.g. x = 1 --> m1, x = 3 --> m3 e.t.c.
func MacOS13OrNewer ¶ added in v0.5.0
func MacOS13OrNewer() bool
MacOS13OrNewer returns if the current OS is macOS 13 or newer.
func MacOS13OrNewerOnArm ¶ added in v0.7.1
func MacOS13OrNewerOnArm() bool
MacOS13OrNewer returns if the current OS is macOS 13 or newer.
func MacOS15OrNewer ¶ added in v0.7.1
func MacOS15OrNewer() bool
MacOS15OrNewer returns if the current OS is macOS 15 or newer.
func MacOSNestedVirtualizationSupported ¶ added in v0.7.3
func MacOSNestedVirtualizationSupported() bool
MacOSNestedVirtualizationSupported returns if the current device supports nested virtualization.
func ParseTemplate ¶
ParseTemplate parses template with body and values and returns the resulting bytes.
func RandomAvailablePort ¶ added in v0.4.0
func RandomAvailablePort() int
RandomAvailablePort returns an available port on the host machine.
func RosettaRunning ¶ added in v0.5.0
func RosettaRunning() bool
RosettaRunning checks if Rosetta process is running.
func RouteExists ¶ added in v0.10.0
RouteExists checks if a route exists for the given subnet on macOS.
func ShellSplit ¶ added in v0.4.3
ShellSplit splits cmd into arguments using.
func SubnetAvailable ¶ added in v0.10.0
SubnetAvailable checks if a subnet (in CIDR notation) does not conflict with any existing host network interface addresses.
Types ¶
This section is empty.