| 117 | } |
| 118 | |
| 119 | func defaultInit() (err error) { |
| 120 | configFile := utils.HomeDirExpand(DefaultConfigFile) |
| 121 | if configFile == DefaultConfigFile { |
| 122 | //System not support ~ dir, need Init manually. |
| 123 | log.Debugf("Could not find CovenantSQL default config location: %v", configFile) |
| 124 | return ErrNotInitialized |
| 125 | } |
| 126 | |
| 127 | log.Debugf("Using CovenantSQL default config location: %v", configFile) |
| 128 | return Init(configFile, []byte("")) |
| 129 | } |
| 130 | |
| 131 | // Init defines init process for client. |
| 132 | func Init(configFile string, masterKey []byte) (err error) { |