Documentation
¶
Index ¶
- func GetEnvOrDefault[T any](key string, defaultVal T, conversionFunc func(string) (T, error)) T
- func IsAppleSiliconMac(goos string, goarch string) bool
- func NewProgressReader(reader io.Reader, report func(int64)) io.Reader
- func OverwriteYAML(sourceYaml []byte, destinationYaml []byte) ([]byte, error)
- func PickFreePort(minPort, maxPort int) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvOrDefault ¶ added in v0.14.0
GetEnvOrDefault returns an environment variable or a default if either the environment variable does not exist or fails to parse using the specified conversionFunc function
func IsAppleSiliconMac ¶ added in v0.8.0
IsAppleSiliconMac returns whether the current machine is an Apple silicon computer, such as the MacBook Air with M1.
func NewProgressReader ¶ added in v0.22.0
NewProgressReader reports throttled intermediate byte counts. It does not report EOF; callers should emit their own completion event.
func OverwriteYAML ¶ added in v0.16.3
func PickFreePort ¶ added in v0.14.11
PickFreePort returns a TCP port in [min,max] that's not in use on the 127.0.0.1 interface. Note that there's a small chance of a race condition when a port is considered free at the time of the call, but not free when something tries to use it. This is good enough for dev and test code though.
Types ¶
This section is empty.