mirror of
https://github.com/status-im/consul.git
synced 2025-02-18 00:27:04 +00:00
Tweaks formatting of Consul version.
This commit is contained in:
parent
8b19364964
commit
970bb771f9
@ -18,7 +18,7 @@ func (c *VersionCommand) Help() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *VersionCommand) Run(_ []string) int {
|
func (c *VersionCommand) Run(_ []string) int {
|
||||||
c.Ui.Output(fmt.Sprintf("Consul Version: %s", c.HumanVersion))
|
c.Ui.Output(fmt.Sprintf("Consul %s", c.HumanVersion))
|
||||||
|
|
||||||
config := agent.DefaultConfig()
|
config := agent.DefaultConfig()
|
||||||
var supplement string
|
var supplement string
|
||||||
@ -26,7 +26,7 @@ func (c *VersionCommand) Run(_ []string) int {
|
|||||||
supplement = fmt.Sprintf(" (agent will automatically use protocol >%d when speaking to compatible agents)",
|
supplement = fmt.Sprintf(" (agent will automatically use protocol >%d when speaking to compatible agents)",
|
||||||
config.Protocol)
|
config.Protocol)
|
||||||
}
|
}
|
||||||
c.Ui.Output(fmt.Sprintf("Protocol Version: speaks %d by default, understands %d to %d%s",
|
c.Ui.Output(fmt.Sprintf("Protocol %d spoken by default, understands %d to %d%s",
|
||||||
config.Protocol, consul.ProtocolVersionMin, consul.ProtocolVersionMax, supplement))
|
config.Protocol, consul.ProtocolVersionMin, consul.ProtocolVersionMax, supplement))
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
@ -73,8 +73,8 @@ running `consul -v`. You'll see output similar to that below:
|
|||||||
|
|
||||||
```
|
```
|
||||||
$ consul -v
|
$ consul -v
|
||||||
Consul Version: v0.7.0
|
Consul v0.7.0
|
||||||
Protocol Version: speaks 2 by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
|
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
|
||||||
```
|
```
|
||||||
|
|
||||||
This says the version of Consul as well as the protocol versions this
|
This says the version of Consul as well as the protocol versions this
|
||||||
|
Loading…
x
Reference in New Issue
Block a user