Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1851)

Side by Side Diff: doc/effective_go.html

Issue 6552060: code review 6552060: effective_go: s/usr/home/ in example (Closed)
Patch Set: diff -r a203e3118c5d https://code.google.com/p/go/ Created 12 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!--{ 1 <!--{
2 "Title": "Effective Go", 2 "Title": "Effective Go",
3 "Template": true 3 "Template": true
4 }--> 4 }-->
5 5
6 <h2 id="introduction">Introduction</h2> 6 <h2 id="introduction">Introduction</h2>
7 7
8 <p> 8 <p>
9 Go is a new language. Although it borrows ideas from 9 Go is a new language. Although it borrows ideas from
10 existing languages, 10 existing languages,
(...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 a common use of <code>init</code> functions is to verify or repair 1767 a common use of <code>init</code> functions is to verify or repair
1768 correctness of the program state before real execution begins. 1768 correctness of the program state before real execution begins.
1769 </p> 1769 </p>
1770 1770
1771 <pre> 1771 <pre>
1772 func init() { 1772 func init() {
1773 if USER == "" { 1773 if USER == "" {
1774 log.Fatal("$USER not set") 1774 log.Fatal("$USER not set")
1775 } 1775 }
1776 if HOME == "" { 1776 if HOME == "" {
1777 HOME = "/usr/" + USER 1777 HOME = "/home/" + USER
1778 } 1778 }
1779 if GOROOT == "" { 1779 if GOROOT == "" {
1780 GOROOT = HOME + "/go" 1780 GOROOT = HOME + "/go"
1781 } 1781 }
1782 // GOROOT may be overridden by --goroot flag on command line. 1782 // GOROOT may be overridden by --goroot flag on command line.
1783 flag.StringVar(&amp;GOROOT, "goroot", GOROOT, "Go root directory") 1783 flag.StringVar(&amp;GOROOT, "goroot", GOROOT, "Go root directory")
1784 } 1784 }
1785 </pre> 1785 </pre>
1786 1786
1787 <h2 id="methods">Methods</h2> 1787 <h2 id="methods">Methods</h2>
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
3040 <pre> 3040 <pre>
3041 verifying implementation 3041 verifying implementation
3042 type Color uint32 3042 type Color uint32
3043 3043
3044 // Check that Color implements image.Color and image.Image 3044 // Check that Color implements image.Color and image.Image
3045 var _ image.Color = Black 3045 var _ image.Color = Black
3046 var _ image.Image = Black 3046 var _ image.Image = Black
3047 </pre> 3047 </pre>
3048 --> 3048 -->
3049 3049
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b