This commit is contained in:
AkmalFairuz
2025-12-11 18:18:41 +07:00
parent 965c8fed4c
commit c00abc4d70
2 changed files with 27 additions and 2 deletions

View File

@@ -295,3 +295,20 @@ func (x *CommandOutputMessage) Marshal(r protocol.IO) {
r.Bool(&x.Success)
protocol.FuncSlice(r, &x.Parameters, r.String)
}
// ToLatest ...
func (x *CommandOutputMessage) ToLatest() protocol.CommandOutputMessage {
return protocol.CommandOutputMessage{
Success: x.Success,
Message: x.Message,
Parameters: x.Parameters,
}
}
// FromLatest ...
func (x *CommandOutputMessage) FromLatest(latest protocol.CommandOutputMessage) CommandOutputMessage {
x.Success = latest.Success
x.Message = latest.Message
x.Parameters = latest.Parameters
return *x
}