add v to version pretty formatter (#8341)

* add v to version pretty formatter

* remove v from json version output
This commit is contained in:
Alvin Huang 2020-07-20 17:43:10 -04:00 committed by GitHub
parent 9f5f8abcbf
commit 5c3018da52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ func newPrettyFormatter() Formatter {
func (_ *prettyFormatter) Format(info *VersionInfo) (string, error) {
var buffer bytes.Buffer
buffer.WriteString(fmt.Sprintf("Consul %s\n", info.HumanVersion))
buffer.WriteString(fmt.Sprintf("Consul v%s\n", info.HumanVersion))
if info.Revision != "" {
buffer.WriteString(fmt.Sprintf("Revision %s\n", info.Revision))
}

View File

@ -1,3 +1,3 @@
Consul 1.99.3-beta1
Consul v1.99.3-beta1
Revision 5e5dbedd47a5f875b60e241c5555a9caab595246
Protocol 2 spoken by default, understands 1 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)