Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
c58d9efc
Commit
c58d9efc
authored
Oct 16, 2009
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix pre-submit editing typo; text is garbled.
R=rsc DELTA=2 (0 added, 0 deleted, 2 changed) OCL=35841 CL=35841
parent
8840726e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
doc/effective_go.html
doc/effective_go.html
+2
-2
No files found.
doc/effective_go.html
View file @
c58d9efc
...
...
@@ -1771,8 +1771,8 @@ it also satisfies all three interfaces:
</p>
<p>
There's one important way in which embedding differs from subclassing. When we embed a type,
the methods of that type become methods of the out
type
<
but
when
they
are
invoked
the
receiver
of
the
method
is
the
inner
type
,
not
the
outer
one
.
the methods of that type become methods of the out
er type,
but when they are invoked the receiver of the method is the inner type, not the outer one.
In our example, when the
<code>
Read
</code>
method of a
<code>
bufio.ReadWriter
</code>
is
invoked, it has the exactly the same effect as the forwarding method written out above;
the receiver is the
<code>
reader
</code>
field of the
<code>
ReadWriter
</code>
, not the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment