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

Minor Rate, RateLimits documentation fixes. #276

Merged
merged 1 commit into from
Feb 11, 2016
Merged

Minor Rate, RateLimits documentation fixes. #276

merged 1 commit into from
Feb 11, 2016

Conversation

dmitshur
Copy link
Member

  • Rate is now a method, not a field.
  • Mention RateLimits rather than RateLimit since the latter is deprecated.
  • Use Go convention for marking deprecated identifiers. See golang/blog@257114a.

@@ -487,7 +487,7 @@ func (r RateLimits) String() string {
return Stringify(r)
}

// RateLimit is deprecated. Use RateLimits instead.
// RateLimit is deprecated. Deprecated: Use RateLimits instead.
Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe I could remove the first sentence altogether? I know golint would complain if it doesn't begin with "// RateLimit ...", but it's not very helpful.

https://godoc.org/image/jpeg#Reader does that, it just says "Deprecated: Reader is deprecated.".

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah, according to golang/blog@257114a it has to appear at the beginning of the paragraph.

Copy link
Member Author

Choose a reason for hiding this comment

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

All right, I've updated it to be more like https://godoc.org/image/jpeg#Reader. It follows the second form as described in golang/go#10909 (comment):

2. long form 1, used with entities lacking docs
// Deprecated: T is deprecated.
type T struct {
     // Deprecated: for backward compatibility FieldC is still populated,
     // but new code should use FieldD instead.
     FieldC int32

     FieldD int64
}

PTAL.

Rate is now a method, not a field.

Mention RateLimits rather than RateLimit since the latter is deprecated.

Use Go convention for marking deprecated identifiers. See
golang/blog@257114a.
@willnorris willnorris merged commit 1219390 into google:master Feb 11, 2016
@dmitshur dmitshur deleted the minor-Rate-doc-fixes branch February 11, 2016 21:31
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.

2 participants