gofmt.
This commit is contained in:
parent
68f30c7367
commit
fc0cd75046
2 changed files with 9 additions and 9 deletions
2
btcd.go
2
btcd.go
|
@ -110,7 +110,7 @@ func btcdMain() error {
|
|||
loggers = setLogLevel(cfg.DebugLevel)
|
||||
}
|
||||
|
||||
// See if we want to enable profiling
|
||||
// See if we want to enable profiling.
|
||||
if cfg.Profile != "" {
|
||||
go func() {
|
||||
log.Errorf("%v", http.ListenAndServe(
|
||||
|
|
16
config.go
16
config.go
|
@ -286,15 +286,15 @@ func loadConfig() (*config, []string, error) {
|
|||
|
||||
// Validate profile port number
|
||||
if cfg.Profile != "" {
|
||||
profilePort, err := strconv.Atoi(cfg.Profile)
|
||||
if err != nil || profilePort < 1024 || profilePort > 65535 {
|
||||
str := "%s: The profile port must be between 1024 and 65535"
|
||||
err := errors.New(fmt.Sprintf(str, "loadConfig"))
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
parser.WriteHelp(os.Stderr)
|
||||
return nil, nil, err
|
||||
profilePort, err := strconv.Atoi(cfg.Profile)
|
||||
if err != nil || profilePort < 1024 || profilePort > 65535 {
|
||||
str := "%s: The profile port must be between 1024 and 65535"
|
||||
err := errors.New(fmt.Sprintf(str, "loadConfig"))
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
parser.WriteHelp(os.Stderr)
|
||||
return nil, nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Append the network type to the data directory so it is "namespaced"
|
||||
// per network. In addition to the block database, there are other
|
||||
|
|
Loading…
Add table
Reference in a new issue