forked from TrueCloudLab/frostfs-api-go
[#225] Do not use wrappers on oneof object.HeadResponse types
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
6db6b569e0
commit
28aad71860
7 changed files with 35 additions and 162 deletions
|
@ -611,13 +611,9 @@ func generateHeadResponseBody(flag bool) *object.HeadResponseBody {
|
|||
var part object.GetHeaderPart
|
||||
|
||||
if flag {
|
||||
short := new(object.GetHeaderPartShort)
|
||||
short.SetShortHeader(generateShortHeader("short id"))
|
||||
part = short
|
||||
part = generateShortHeader("short id")
|
||||
} else {
|
||||
full := new(object.GetHeaderPartFull)
|
||||
full.SetHeaderWithSignature(generateHeaderWithSignature())
|
||||
part = full
|
||||
part = generateHeaderWithSignature()
|
||||
}
|
||||
|
||||
req.SetHeaderPart(part)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue