Small tweaks to base command

pull/2717/head
Kyle Havlovitz 2017-02-07 20:56:49 -05:00
parent 197dc10a7f
commit 0b85bbfed1
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 type FlagSetFlags uint
const ( const (
FlagSetNone FlagSetFlags = iota << 1 FlagSetNone FlagSetFlags = 1 << iota
FlagSetClientHTTP FlagSetFlags = iota << 1 FlagSetClientHTTP FlagSetFlags = 1 << iota
FlagSetServerHTTP FlagSetFlags = iota << 1 FlagSetServerHTTP FlagSetFlags = 1 << iota
FlagSetHTTP = FlagSetClientHTTP | FlagSetServerHTTP FlagSetHTTP = FlagSetClientHTTP | FlagSetServerHTTP
) )
@ -55,7 +55,6 @@ func (c *Command) HTTPClient() (*api.Client, error) {
c.httpAddr.Merge(&config.Address) c.httpAddr.Merge(&config.Address)
c.token.Merge(&config.Token) c.token.Merge(&config.Token)
c.datacenter.Merge(&config.Datacenter) c.datacenter.Merge(&config.Datacenter)
c.Ui.Info(fmt.Sprintf("client http addr: %s", config.Address))
return api.NewClient(config) return api.NewClient(config)
} }

View File

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