mirror of
https://github.com/restic/restic.git
synced 2024-12-24 16:54:00 +00:00
init: use standard name message_type
to distinguish JSON messages
This commit is contained in:
parent
9a9f559806
commit
364a396fd6
1 changed files with 6 additions and 6 deletions
|
@ -110,9 +110,9 @@ func runInit(ctx context.Context, opts InitOptions, gopts GlobalOptions, args []
|
|||
|
||||
} else {
|
||||
status := initSuccess{
|
||||
Status: "success",
|
||||
ID: s.Config().ID,
|
||||
Repository: location.StripPassword(gopts.Repo),
|
||||
MessageType: "initialized",
|
||||
ID: s.Config().ID,
|
||||
Repository: location.StripPassword(gopts.Repo),
|
||||
}
|
||||
return json.NewEncoder(gopts.stdout).Encode(status)
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ func maybeReadChunkerPolynomial(ctx context.Context, opts InitOptions, gopts Glo
|
|||
}
|
||||
|
||||
type initSuccess struct {
|
||||
Status string `json:"status"` // "success"
|
||||
ID string `json:"id"`
|
||||
Repository string `json:"repository"`
|
||||
MessageType string `json:"message_type"` // "initialized"
|
||||
ID string `json:"id"`
|
||||
Repository string `json:"repository"`
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue