Skip to content

user: fix swapped file references in error godoc#233

Open
sueun-dev wants to merge 1 commit into
moby:mainfrom
sueun-dev:fix-user-error-godoc
Open

user: fix swapped file references in error godoc#233
sueun-dev wants to merge 1 commit into
moby:mainfrom
sueun-dev:fix-user-error-godoc

Conversation

@sueun-dev

Copy link
Copy Markdown

The doc comments on ErrNoPasswdEntries and ErrNoGroupEntries are swapped. ErrNoPasswdEntries ("no matching entries in passwd file", returned from LookupUser/LookupUid and GetExecUser's user lookup) is documented as /etc/group, and ErrNoGroupEntries ("no matching entries in group file", returned from LookupGroup/LookupGid and GetExecUser's group lookup) is documented as /etc/passwd. Each comment names the other file.

The variable name, error message, and every usage agree; only the comment is wrong, and since these are exported errors the incorrect text shows up in godoc. This swaps the two references so each comment matches its variable.

ErrNoPasswdEntries and ErrNoGroupEntries had their doc comments swapped:
ErrNoPasswdEntries ("no matching entries in passwd file", returned from
LookupUser/LookupUid and GetExecUser's user lookup) was documented as
/etc/group, and ErrNoGroupEntries ("no matching entries in group file",
returned from LookupGroup/LookupGid and GetExecUser's group lookup) was
documented as /etc/passwd. The variable name, error message, and every
usage agree; only the comment was wrong. Swap the two references so each
comment matches its variable.

Signed-off-by: Sueun Cho <sueun.dev@gmail.com>
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.

1 participant