From 3104e5e167cd4981eefffe30bd148501af3df012 Mon Sep 17 00:00:00 2001 From: Andrew Haines Date: Mon, 17 Jun 2024 17:06:21 +0100 Subject: [PATCH] Add `(*StatusCmd).Bytes()` method Signed-off-by: Andrew Haines --- command.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command.go b/command.go index c6cd9db6d..6bb787be1 100644 --- a/command.go +++ b/command.go @@ -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) }