[#1064] cli: Add EC header output to object head
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
8668cbf147
commit
bdf4990904
1 changed files with 9 additions and 0 deletions
|
@ -171,6 +171,15 @@ func printHeader(cmd *cobra.Command, obj *objectSDK.Object) error {
|
||||||
cmd.Printf(" signature: %s\n", hex.EncodeToString(sigV2.GetSign()))
|
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)
|
return printSplitHeader(cmd, obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue