mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 06:46:34 +00:00
version: add message_type in --json mode
This commit is contained in:
parent
33c670dd7a
commit
2d250a9135
@ -25,6 +25,7 @@ Exit status is 1 if there was any error.
|
||||
Run: func(_ *cobra.Command, _ []string) {
|
||||
if globalOptions.JSON {
|
||||
type jsonVersion struct {
|
||||
MessageType string `json:"message_type"` // version
|
||||
Version string `json:"version"`
|
||||
GoVersion string `json:"go_version"`
|
||||
GoOS string `json:"go_os"`
|
||||
@ -32,6 +33,7 @@ Exit status is 1 if there was any error.
|
||||
}
|
||||
|
||||
jsonS := jsonVersion{
|
||||
MessageType: "version",
|
||||
Version: version,
|
||||
GoVersion: runtime.Version(),
|
||||
GoOS: runtime.GOOS,
|
||||
|
Loading…
Reference in New Issue
Block a user