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

Clarify the role of io.EOF in Decode #1015

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ func (dec *Decoder) KnownFields(enable bool) {
}

// Decode reads the next YAML-encoded value from its input
// and stores it in the value pointed to by v.
// and stores it in the value pointed to by v. If there are
// no more yaml documents to decode (or there never was, for
// example if the Decoder's io.Reader never had any bytes),
// it will return an io.EOF
Copy link

@dolmen dolmen Feb 21, 2024

Choose a reason for hiding this comment

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

Please use godoc links and end the sentence with a dot.

//
// See the documentation for Unmarshal for details about the
// conversion of YAML into a Go value.
Expand Down