forked from TrueCloudLab/frostfs-node
[#2090] neofs-cli: Remove --header
from object get
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
79130f781e
commit
51e886dd67
2 changed files with 6 additions and 9 deletions
|
@ -41,7 +41,8 @@ Changelog for NeoFS Node
|
||||||
- ObjectID signature output in the CLI (#2104)
|
- ObjectID signature output in the CLI (#2104)
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- `-g` option from `neofs-cli control ...` and `neofs-cli container create` commands
|
- `-g` option from `neofs-cli control ...` and `neofs-cli container create` commands (#2089)
|
||||||
|
- `--header` from `neofs-cli object get` (#2090)
|
||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
### Updating from v0.34.0
|
### Updating from v0.34.0
|
||||||
|
|
|
@ -37,7 +37,6 @@ func initObjectGetCmd() {
|
||||||
_ = objectGetCmd.MarkFlagRequired(commonflags.OIDFlag)
|
_ = objectGetCmd.MarkFlagRequired(commonflags.OIDFlag)
|
||||||
|
|
||||||
flags.String(fileFlag, "", "File to write object payload to(with -b together with signature and header). Default: stdout.")
|
flags.String(fileFlag, "", "File to write object payload to(with -b together with signature and header). Default: stdout.")
|
||||||
flags.String("header", "", "File to write header to. Default: stdout.")
|
|
||||||
flags.Bool(rawFlag, false, rawFlagDesc)
|
flags.Bool(rawFlag, false, rawFlagDesc)
|
||||||
flags.Bool(noProgressFlag, false, "Do not show progress bar")
|
flags.Bool(noProgressFlag, false, "Do not show progress bar")
|
||||||
flags.Bool(binaryFlag, false, "Serialize whole object structure into given file(id + signature + header + payload).")
|
flags.Bool(binaryFlag, false, "Serialize whole object structure into given file(id + signature + header + payload).")
|
||||||
|
@ -124,16 +123,13 @@ func getObject(cmd *cobra.Command, _ []string) {
|
||||||
common.ExitOnErr(cmd, "unable to write binary object in out: %w ", err)
|
common.ExitOnErr(cmd, "unable to write binary object in out: %w ", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
hdrFile := cmd.Flag("header").Value.String()
|
if filename != "" && !strictOutput(cmd) {
|
||||||
if filename != "" {
|
cmd.Printf("[%s] Object successfully saved\n", filename)
|
||||||
if hdrFile != "" || !strictOutput(cmd) {
|
|
||||||
cmd.Printf("[%s] Object successfully saved\n", filename)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print header only if file is not streamed to stdout.
|
// Print header only if file is not streamed to stdout.
|
||||||
if filename != "" || hdrFile != "" {
|
if filename != "" {
|
||||||
err = saveAndPrintHeader(cmd, res.Header(), hdrFile)
|
err = printHeader(cmd, res.Header())
|
||||||
common.ExitOnErr(cmd, "", err)
|
common.ExitOnErr(cmd, "", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue