coreutils.go
1package shell
2
3import (
4 "os"
5 "runtime"
6 "strconv"
7)
8
9var useGoCoreUtils bool
10
11func init() {
12 // If CRUSH_CORE_UTILS is set to either true or false, respect that.
13 // By default, enable on Windows only.
14 if v, err := strconv.ParseBool(os.Getenv("CRUSH_CORE_UTILS")); err == nil {
15 useGoCoreUtils = v
16 } else {
17 useGoCoreUtils = runtime.GOOS == "windows"
18 }
19}