run go fmt on config file

This commit is contained in:
Olaoluwa Osuntokun 2016-03-22 13:30:54 -07:00
parent e07086a523
commit 90063e1431
1 changed files with 33 additions and 32 deletions

View File

@ -1,12 +1,13 @@
package main
import (
"io/ioutil"
"os"
"path/filepath"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcutil"
flags "github.com/btcsuite/go-flags"
"path/filepath"
"io/ioutil"
"os"
)
const (
@ -81,21 +82,21 @@ func loadConfig() (*config, error) {
return nil, err
}
_, err = flags.Parse(&cfg)
// Determine net parameters
// Determine net parameters
if cfg.UseRegtest {
cfg.NetParams = &chaincfg.RegressionNetParams
} else {
cfg.NetParams = &chaincfg.TestNet3Params
}
// Read certificate if needed
if cfg.BTCDCACertPath!=""{
// Read certificate if needed
if cfg.BTCDCACertPath != "" {
f, err := os.Open(cfg.BTCDCACertPath)
defer f.Close()
if err!=nil{
if err != nil {
return nil, err
}
cert, err := ioutil.ReadAll(f)
if err!=nil{
if err != nil {
return nil, err
}
cfg.BTCDCACert = cert