mirror of https://github.com/hashicorp/consul
Small tweaks to base command
parent
197dc10a7f
commit
0b85bbfed1
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue