Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/goPublic

Commit0f1a18b

Browse files
committed
[release-branch.go1.1] effective_go.html: be more accepting in the guidelines for interface names
««« CL 9274043 / bbe324079abeeffective_go.html: be more accepting in the guidelines for interface namesFixes#5421.R=golang-dev, bradfitz, adgCC=golang-devhttps://golang.org/cl/9274043»»»R=golang-dev, rCC=golang-devhttps://golang.org/cl/9137045
1 parent1c5438a commit0f1a18b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎doc/effective_go.html‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,10 @@ <h3 id="interface-names">Interface names</h3>
403403

404404
<p>
405405
By convention, one-method interfaces are named by
406-
the method name plus the -er suffix:<code>Reader</code>,
407-
<code>Writer</code>,<code>Formatter</code> etc.
406+
the method name plus an -er suffix or similar modification
407+
to construct an agent noun:<code>Reader</code>,
408+
<code>Writer</code>,<code>Formatter</code>,
409+
<code>CloseNotifier</code> etc.
408410
</p>
409411

410412
<p>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp