mirror of
https://github.com/status-im/consul.git
synced 2025-01-20 18:50:04 +00:00
add v to version pretty formatter (#8341)
* add v to version pretty formatter * remove v from json version output
This commit is contained in:
parent
65566e2c98
commit
30f5600b47
@ -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))
|
||||
}
|
||||
|
2
command/version/testdata/pretty.golden
vendored
2
command/version/testdata/pretty.golden
vendored
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user