Skip to content

Commit

Permalink
Tweaks formatting of Consul version.
Browse files Browse the repository at this point in the history
  • Loading branch information
slackpad committed Aug 26, 2016
1 parent 8b19364 commit 970bb77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions command/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ func (c *VersionCommand) Help() string {
}

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()
var supplement string
if config.Protocol < consul.ProtocolVersionMax {
supplement = fmt.Sprintf(" (agent will automatically use protocol >%d when speaking to compatible agents)",
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))

return 0
Expand Down
4 changes: 2 additions & 2 deletions website/source/docs/upgrading.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ running `consul -v`. You'll see output similar to that below:

```
$ consul -v
Consul Version: v0.7.0
Protocol Version: speaks 2 by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
Consul v0.7.0
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
Expand Down

0 comments on commit 970bb77

Please sign in to comment.