Skip to content

docs: rewrite Tags.Get doc comment#28

Open
c-tonneslan wants to merge 1 commit into
fatih:masterfrom
c-tonneslan:docs/fix-get-comment
Open

docs: rewrite Tags.Get doc comment#28
c-tonneslan wants to merge 1 commit into
fatih:masterfrom
c-tonneslan:docs/fix-get-comment

Conversation

@c-tonneslan

Copy link
Copy Markdown

For #26.

The current Get comment talks about an `ok` return value that doesn't exist (the function returns `(*Tag, error)`) and mentions returning an 'empty string' which doesn't match how Tag is structured. Updated to actually describe the signature and the only error returned.

This is intentionally separate from the export-sentinels PR (#27) so each can land on its own. Once #27 lands the doc can be tightened further to mention `errors.Is(err, structtag.ErrTagNotExist)`.

The current comment describes a returned 'ok' value that doesn't
exist (the function returns *Tag and error), and the wording about the
value 'being the empty string' doesn't match how Tag is structured
either. Cleaned-up phrasing that actually matches the signature and
the only error it can return.

For fatih#26

Signed-off-by: Charlie Tonneslan <cst0520@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