Fixed errors found by staticcheck

Staticcheck has probably been updated and is finding new errors.
They have been fixed.

Also, moved the run of staticcheck before running the test suite,
so if it fails, it fails sooner ;-).
This commit is contained in:
Ivan Kozlovic
2017-01-24 19:28:55 -07:00
parent 63d6ef9546
commit 27bfed541c
5 changed files with 19 additions and 13 deletions

View File

@@ -278,6 +278,9 @@ func configureClusterOpts(opts *server.Options) error {
// If cluster flag override, process it
if opts.Cluster.ListenStr != "" {
clusterURL, err := url.Parse(opts.Cluster.ListenStr)
if err != nil {
return err
}
h, p, err := net.SplitHostPort(clusterURL.Host)
if err != nil {
return err