Small tweaks to base command

This commit is contained in:
Kyle Havlovitz 2017-02-07 20:56:49 -05:00
parent 2b02fb575b
commit 0f20f06021
No known key found for this signature in database
GPG key ID: 8A5E6B173056AD6C
2 changed files with 6 additions and 7 deletions

View file

@ -21,9 +21,9 @@ const maxLineLength int = 72
type FlagSetFlags uint
const (
FlagSetNone FlagSetFlags = iota << 1
FlagSetClientHTTP FlagSetFlags = iota << 1
FlagSetServerHTTP FlagSetFlags = iota << 1
FlagSetNone FlagSetFlags = 1 << iota
FlagSetClientHTTP FlagSetFlags = 1 << iota
FlagSetServerHTTP FlagSetFlags = 1 << iota
FlagSetHTTP = FlagSetClientHTTP | FlagSetServerHTTP
)
@ -55,7 +55,6 @@ func (c *Command) HTTPClient() (*api.Client, error) {
c.httpAddr.Merge(&config.Address)
c.token.Merge(&config.Token)
c.datacenter.Merge(&config.Datacenter)
c.Ui.Info(fmt.Sprintf("client http addr: %s", config.Address))
return api.NewClient(config)
}

View file

@ -2,14 +2,14 @@ package base
import (
"fmt"
"os"
"path/filepath"
"reflect"
"sort"
"strconv"
"time"
"github.com/mitchellh/mapstructure"
"os"
"path/filepath"
"sort"
)
// TODO (slackpad) - Trying out a different pattern here for config handling.