提交 edf0bb05 作者: slothbag

Tidy up object put cmd defaults

License: MIT
Signed-off-by: 's avatarslothbag <slothbag@gmail.com>
上级 903a4851
......@@ -344,7 +344,7 @@ And then run:
},
Options: []cmds.Option{
cmds.StringOption("inputenc", "Encoding type of input data, either \"protobuf\" or \"json\"."),
cmds.StringOption("datafieldenc", "Encoding type of the data field, either \"text\" or \"base64\"."),
cmds.StringOption("datafieldenc", "Encoding type of the data field, either \"text\" or \"base64\".").Default("text"),
},
Run: func(req cmds.Request, res cmds.Response) {
n, err := req.InvocContext().GetNode()
......@@ -373,10 +373,7 @@ And then run:
res.SetError(err, cmds.ErrNormal)
return
}
if !found {
datafieldenc = "text"
}
output, err := objectPut(n, input, inputenc, datafieldenc)
if err != nil {
errType := cmds.ErrNormal
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论