2
0

coreutils.go 362 B

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