From fc0cd75046fed3f22099c2ede2046ad2ddbfb386 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Tue, 17 Sep 2013 17:04:40 -0500 Subject: [PATCH] gofmt. --- btcd.go | 2 +- config.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/btcd.go b/btcd.go index fe159be9..92715932 100644 --- a/btcd.go +++ b/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( diff --git a/config.go b/config.go index 80331fd9..9dae6d1b 100644 --- a/config.go +++ b/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