Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Go
/
Go
An `io.Reader` returns `n > 0` and `err == io.EOF` in the same call. What should the call…
from Go
beginner
1 min
An `io.Reader` returns `n > 0` and `err == io.EOF` in the same call. What should the caller do?
Process the first `n` bytes, then handle the EOF.
Discard the bytes because every non-nil error invalidates `n`.
Retry the same read until it returns the bytes with a nil error.
Check
Ask AI about this kata
Report an error
previous kata
Name the sentinel returned by `QueryRow(...).Scan(...)` when a query produces no row
Fill in
next kata
A repository must bind a slice safely into an SQL `IN` clause and support PostgreSQL plac…
Quiz
A new version is available
Reload