Documentation
¶
Overview ¶
Package envutil provides utility functions for working with environment variables.
Index ¶
Constants ¶
const ( GoBackendSIMD_AVX512 = "GOMLX_GO_SIMD_AVX512" GoBackendSIMD_AVX2 = "GOMLX_GO_SIMD_AVX2" GoBackendFusion = "GOMLX_GO_FUSION" GoBackendDotMatmul = "GOMLX_GO_DOT_MATMUL" GoBackendAVX512_ASM = "GOMLX_GO_AVX512_ASM" GoBackendAVX512_KC = "GOMLX_GO_AVX512_KC" GoBackendAVX512_MC = "GOMLX_GO_AVX512_MC" GoBackendAVX512_NC = "GOMLX_GO_AVX512_NC" )
Environment variables used by the Go backend: mostly SIMD instructions and optimizations. By default it uses whatever the CPU supports, but this allows one to disable them in case of issues.
Variables ¶
var ( FalseValues = sets.MakeWith("0", "false", "f", "no", "off", "disabled") TrueValues = sets.MakeWith("1", "true", "t", "yes", "on", "enabled") )
Functions ¶
func MustReadBool ¶
MustReadBool reads the boolean value of the environment variable with the given name. If not set, it returns the defaultValue.
It panics with an informative error if the value is set but it is not able to parse a valid boolean value.
func MustReadInt ¶ added in v0.1.8
MustReadInt reads the integer value of the environment variable with the given name. If not set, it returns the defaultValue.
It panics with an informative error if the value is set but it is not able to parse a valid integer value.
Types ¶
This section is empty.