forked from TrueCloudLab/frostfs-node
[#1388] cli: Drop unused flag/parameter
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
95597d3437
commit
2bd560e528
2 changed files with 0 additions and 10 deletions
|
@ -565,13 +565,6 @@ type HeadObjectPrm struct {
|
||||||
commonObjectPrm
|
commonObjectPrm
|
||||||
objectAddressPrm
|
objectAddressPrm
|
||||||
rawPrm
|
rawPrm
|
||||||
|
|
||||||
mainOnly bool
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetMainOnlyFlag sets flag to get only main fields of an object header in terms of FrostFS API.
|
|
||||||
func (x *HeadObjectPrm) SetMainOnlyFlag(v bool) {
|
|
||||||
x.mainOnly = v
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// HeadObjectRes groups the resulting values of HeadObject operation.
|
// HeadObjectRes groups the resulting values of HeadObject operation.
|
||||||
|
|
|
@ -38,7 +38,6 @@ func initObjectHeadCmd() {
|
||||||
_ = objectHeadCmd.MarkFlagRequired(commonflags.OIDFlag)
|
_ = objectHeadCmd.MarkFlagRequired(commonflags.OIDFlag)
|
||||||
|
|
||||||
flags.String(fileFlag, "", "File to write header to. Default: stdout.")
|
flags.String(fileFlag, "", "File to write header to. Default: stdout.")
|
||||||
flags.Bool("main-only", false, "Return only main fields")
|
|
||||||
flags.Bool(commonflags.JSON, false, "Marshal output in JSON")
|
flags.Bool(commonflags.JSON, false, "Marshal output in JSON")
|
||||||
flags.Bool("proto", false, "Marshal output in Protobuf")
|
flags.Bool("proto", false, "Marshal output in Protobuf")
|
||||||
flags.Bool(rawFlag, false, rawFlagDesc)
|
flags.Bool(rawFlag, false, rawFlagDesc)
|
||||||
|
@ -49,7 +48,6 @@ func getObjectHeader(cmd *cobra.Command, _ []string) {
|
||||||
var obj oid.ID
|
var obj oid.ID
|
||||||
|
|
||||||
objAddr := readObjectAddress(cmd, &cnr, &obj)
|
objAddr := readObjectAddress(cmd, &cnr, &obj)
|
||||||
mainOnly, _ := cmd.Flags().GetBool("main-only")
|
|
||||||
pk := key.GetOrGenerate(cmd)
|
pk := key.GetOrGenerate(cmd)
|
||||||
|
|
||||||
cli := internalclient.GetSDKClientByFlag(cmd, pk, commonflags.RPC)
|
cli := internalclient.GetSDKClientByFlag(cmd, pk, commonflags.RPC)
|
||||||
|
@ -62,7 +60,6 @@ func getObjectHeader(cmd *cobra.Command, _ []string) {
|
||||||
raw, _ := cmd.Flags().GetBool(rawFlag)
|
raw, _ := cmd.Flags().GetBool(rawFlag)
|
||||||
prm.SetRawFlag(raw)
|
prm.SetRawFlag(raw)
|
||||||
prm.SetAddress(objAddr)
|
prm.SetAddress(objAddr)
|
||||||
prm.SetMainOnlyFlag(mainOnly)
|
|
||||||
|
|
||||||
res, err := internalclient.HeadObject(cmd.Context(), prm)
|
res, err := internalclient.HeadObject(cmd.Context(), prm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue