Add `(*StatusCmd).Bytes()` method (#3030)

Signed-off-by: Andrew Haines <andrew@haines.org.nz>
Co-authored-by: Monkey <golang@88.com>
This commit is contained in:
Andrew Haines 2024-06-21 04:00:16 +01:00 committed by GitHub
parent fc4c8bd2f7
commit 2d7382e8cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -573,6 +573,10 @@ func (cmd *StatusCmd) Result() (string, error) {
return cmd.val, cmd.err
}
func (cmd *StatusCmd) Bytes() ([]byte, error) {
return util.StringToBytes(cmd.val), cmd.err
}
func (cmd *StatusCmd) String() string {
return cmdString(cmd, cmd.val)
}