Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use ReadFull instead of Read #349

Merged
merged 1 commit into from
Sep 22, 2020
Merged

use ReadFull instead of Read #349

merged 1 commit into from
Sep 22, 2020

Conversation

QiJune
Copy link
Collaborator

@QiJune QiJune commented Sep 22, 2020

Fix #346

Read reads data into p. It returns the number of bytes read into p. 
The bytes are taken from at most one Read on the underlying Reader, hence n may be less than len(p).
To read exactly len(p) bytes, use io.ReadFull(b, p). At EOF, the count will be zero and err will be io.EOF.

Copy link
Collaborator

@Yancey1989 Yancey1989 left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Sep 22, 2020

Codecov Report

Merging #349 into develop will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #349   +/-   ##
========================================
  Coverage    87.29%   87.29%           
========================================
  Files           33       33           
  Lines         1448     1448           
========================================
  Hits          1264     1264           
  Misses         121      121           
  Partials        63       63           
Impacted Files Coverage Δ
vision/imageloader/imageloader.go 85.71% <100.00%> (ø)

@QiJune QiJune merged commit 078f033 into wangkuiyi:develop Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants