add v to version pretty formatter (#8341)

* add v to version pretty formatter

* remove v from json version output
pull/8343/head
Alvin Huang 4 years ago committed by GitHub
parent 57e00b0fd5
commit dd9f5928fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

Loading…
Cancel
Save