8 // HomeDirFromEnvironment returns the directory to use
9 // for reading config and storing variable data.
10 // It returns $BYTOM_HOME,
11 // or, if that is empty, $HOME/.chaincore.
12 func HomeDirFromEnvironment() string {
13 if s := os.Getenv("BYTOM_HOME"); s != "" {
16 return filepath.Join(os.Getenv("HOME"), ".bytom")