forked from TrueCloudLab/frostfs-http-gw
*: fix all comment-related golint warnings
Some of this code is going to be moved to SDK library, so it's important. Signed-off-by: Roman Khimov <roman@nspcc.ru>
This commit is contained in:
parent
3173c70eb6
commit
df3c87af79
14 changed files with 88 additions and 4 deletions
|
@ -165,11 +165,13 @@ func (o objectIDs) Slice() []string {
|
|||
return res
|
||||
}
|
||||
|
||||
// Downloader is a download request handler.
|
||||
type Downloader struct {
|
||||
log *zap.Logger
|
||||
plant neofs.ClientPlant
|
||||
}
|
||||
|
||||
// New creates an instance of Downloader using specified options.
|
||||
func New(ctx context.Context, log *zap.Logger, plant neofs.ClientPlant) (*Downloader, error) {
|
||||
var err error
|
||||
d := &Downloader{log: log, plant: plant}
|
||||
|
@ -187,6 +189,7 @@ func (d *Downloader) newRequest(ctx *fasthttp.RequestCtx, log *zap.Logger) *requ
|
|||
}
|
||||
}
|
||||
|
||||
// DownloadByAddress handles download requests using simple cid/oid format.
|
||||
func (d *Downloader) DownloadByAddress(c *fasthttp.RequestCtx) {
|
||||
var (
|
||||
err error
|
||||
|
@ -214,6 +217,7 @@ func (d *Downloader) DownloadByAddress(c *fasthttp.RequestCtx) {
|
|||
d.newRequest(c, log).receiveFile(getOpts)
|
||||
}
|
||||
|
||||
// DownloadByAttribute handles attribute-based download requests.
|
||||
func (d *Downloader) DownloadByAttribute(c *fasthttp.RequestCtx) {
|
||||
var (
|
||||
err error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue