Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

[#76] Added HEAD methods #79

Merged

Conversation

KirillovDenis
Copy link
Contributor

closes #76

Signed-off-by: Denis Kirillov denis@nspcc.ru

@codecov
Copy link

codecov bot commented Jul 12, 2021

Codecov Report

Merging #79 (8791848) into master (dee182a) will decrease coverage by 3.95%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #79      +/-   ##
==========================================
- Coverage   18.18%   14.22%   -3.96%     
==========================================
  Files           2        3       +1     
  Lines         198      253      +55     
==========================================
  Hits           36       36              
- Misses        158      213      +55     
  Partials        4        4              
Impacted Files Coverage Δ
downloader/download.go 4.79% <0.00%> (-0.18%) ⬇️
downloader/head.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b8aa49...8791848. Read the comment docs.

r.SetContentType(contentType)
}

func (r *request) handleErr(err error, start time.Time) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to use more specific name there, e.g. handleAPIErr or handleNeoFSErr. And then we can fix #30 there by parsing error details without grpc.Status.

d.byAddress(c, request.headObject)
}

func (d *Downloader) byAddress(c *fasthttp.RequestCtx, f func(request, client.Object, *object.Address)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be appreciated to see some comments in code about f here and reference it in byAttribute.
Alternatively you can write comments about byAddress function that it prepares input data for f() to process. It will help for other developers to get into it.

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
@masterSplinter01
Copy link
Contributor

Could you please add some documentation about HEAD methods into the README?
Do HEAD methods download objects? Maybe it'd be better to move the methods into a separate file, e.g. head.go.

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
@alexvanin alexvanin merged commit ce32b26 into nspcc-dev:master Jul 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HEAD verb should be supported
3 participants