Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
miekg committed Feb 1, 2011
1 parent 486c29a commit fecc10b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions go-interfaces.tex
Expand Up @@ -215,6 +215,13 @@ \subsection{Pointers to interfaces}
automatically dereference the pointer. A pointer to an interface value is more
often a beginner's bug than correct code.
\end{quote}
From the \cite{go_faq}. If not for this restriction, this code:
\begin{lstlisting}
var buf bytes.Buffer
io.Copy(buf, os.Stdin)
\end{lstlisting}
Would copy standard input into a copy of \bar{buf}, not into \var{buf} itself.
This is almost never the desired behavior.

\section{Interface names}
By convention, one-method interfaces are named by the method name plus
Expand Down
6 changes: 6 additions & 0 deletions go.bib
Expand Up @@ -224,3 +224,9 @@ @misc{RFC4641
title = "DNSSEC Operational Practices",
howpublished = {\url{http://www.ietf.org/rfc/rfc4641.txt}}
}

@misc{go_faq,
author = "Go Authors",
title = "Go FAQ",
howpublished = {\url{http://golang.org/doc/go_faq.html}}
}

0 comments on commit fecc10b

Please sign in to comment.