mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
26 lines
393 B
Go
26 lines
393 B
Go
|
package chaincfg
|
||
|
|
||
|
import (
|
||
|
stdlog "log"
|
||
|
"os"
|
||
|
"path/filepath"
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
HomeDirName = ".0gchain"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
// DefaultNodeHome default home directories for the application daemon
|
||
|
DefaultNodeHome string
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
userHomeDir, err := os.UserHomeDir()
|
||
|
if err != nil {
|
||
|
stdlog.Printf("Failed to get home dir %v", err)
|
||
|
}
|
||
|
|
||
|
DefaultNodeHome = filepath.Join(userHomeDir, HomeDirName)
|
||
|
}
|