[#1064] cli: Add EC header output to object head

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
pull/1020/head
Dmitrii Stepanov 2024-03-28 17:27:22 +03:00 committed by Evgenii Stratonikov
parent 8668cbf147
commit bdf4990904
1 changed files with 9 additions and 0 deletions

View File

@ -171,6 +171,15 @@ func printHeader(cmd *cobra.Command, obj *objectSDK.Object) error {
cmd.Printf(" signature: %s\n", hex.EncodeToString(sigV2.GetSign()))
}
if ecHeader := obj.ECHeader(); ecHeader != nil {
cmd.Print("EC header:\n")
cmd.Printf(" parent object ID: %s\n", ecHeader.Parent().EncodeToString())
cmd.Printf(" index: %d\n", ecHeader.Index())
cmd.Printf(" total: %d\n", ecHeader.Total())
cmd.Printf(" header length: %d\n", ecHeader.HeaderLength())
}
return printSplitHeader(cmd, obj)
}