diff options
| author | Bryan C. Mills <bcmills@google.com> | 2016-07-12 18:56:07 -0400 |
|---|---|---|
| committer | Bryan Mills <bcmills@google.com> | 2016-07-13 16:19:07 +0000 |
| commit | 2fcb25e07b2549f607aa174ceab974f8732ea0f4 (patch) | |
| tree | 166b21d42315ed0ac8899f465b1eac74eb79c702 /src/net/http | |
| parent | a1110c39301b21471c27dad0e50cdbe499587fc8 (diff) | |
| download | go-2fcb25e07b2549f607aa174ceab974f8732ea0f4.tar.xz | |
doc/effective_go: clarify advice on returning interfaces
New Gophers sometimes misconstrue the advice in the "Generality" section
as "export interfaces instead of implementations" and add needless
interfaces to their code as a result. Down the road, they end up
needing to add methods and either break existing callers or have to
resort to unpleasant hacks (e.g. using "magic method" type-switches).
Weaken the first paragraph of this section to only advise leaving types
unexported when they will never need additional methods.
Change-Id: I32a1ae44012b5896faf167c02e192398a4dfc0b8
Reviewed-on: https://go-review.googlesource.com/24892
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'src/net/http')
0 files changed, 0 insertions, 0 deletions
