parent
68cc690ca4
commit
b4568f3025
4
public/arrays
generated
4
public/arrays
generated
@ -196,9 +196,11 @@ typical Go. We’ll look at slices next.</p>
|
|||||||
Next example: <a href="slices">Slices</a>.
|
Next example: <a href="slices">Slices</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/arrays">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/atomic-counters
generated
4
public/atomic-counters
generated
@ -224,9 +224,11 @@ state.</p>
|
|||||||
Next example: <a href="mutexes">Mutexes</a>.
|
Next example: <a href="mutexes">Mutexes</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/atomic-counters">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/base64-encoding
generated
4
public/base64-encoding
generated
@ -180,9 +180,11 @@ but they both decode to the original string as desired.</p>
|
|||||||
Next example: <a href="reading-files">Reading Files</a>.
|
Next example: <a href="reading-files">Reading Files</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/base64-encoding">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/channel-buffering
generated
4
public/channel-buffering
generated
@ -142,9 +142,11 @@ concurrent receive.</p>
|
|||||||
Next example: <a href="channel-synchronization">Channel Synchronization</a>.
|
Next example: <a href="channel-synchronization">Channel Synchronization</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/channel-buffering">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/channel-directions
generated
4
public/channel-directions
generated
@ -134,9 +134,11 @@ receive on this channel.</p>
|
|||||||
Next example: <a href="select">Select</a>.
|
Next example: <a href="select">Select</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/channel-directions">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/channel-synchronization
generated
4
public/channel-synchronization
generated
@ -173,9 +173,11 @@ started.</p>
|
|||||||
Next example: <a href="channel-directions">Channel Directions</a>.
|
Next example: <a href="channel-directions">Channel Directions</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/channel-synchronization">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/channels
generated
4
public/channels
generated
@ -158,9 +158,11 @@ message without having to use any other synchronization.</p>
|
|||||||
Next example: <a href="channel-buffering">Channel Buffering</a>.
|
Next example: <a href="channel-buffering">Channel Buffering</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/channels">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/closing-channels
generated
4
public/closing-channels
generated
@ -184,9 +184,11 @@ example: <code>range</code> over channels.</p>
|
|||||||
Next example: <a href="range-over-channels">Range over Channels</a>.
|
Next example: <a href="range-over-channels">Range over Channels</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/closing-channels">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/closures
generated
4
public/closures
generated
@ -179,9 +179,11 @@ recursion.</p>
|
|||||||
Next example: <a href="recursion">Recursion</a>.
|
Next example: <a href="recursion">Recursion</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/closures">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/collection-functions
generated
4
public/collection-functions
generated
@ -354,9 +354,11 @@ type.</p>
|
|||||||
Next example: <a href="string-functions">String Functions</a>.
|
Next example: <a href="string-functions">String Functions</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/collection-functions">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/command-line-arguments
generated
4
public/command-line-arguments
generated
@ -159,9 +159,11 @@ with flags.</p>
|
|||||||
Next example: <a href="command-line-flags">Command-Line Flags</a>.
|
Next example: <a href="command-line-flags">Command-Line Flags</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/command-line-arguments">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/command-line-flags
generated
4
public/command-line-flags
generated
@ -295,9 +295,11 @@ and show the help text again.</p>
|
|||||||
Next example: <a href="command-line-subcommands">Command-Line Subcommands</a>.
|
Next example: <a href="command-line-subcommands">Command-Line Subcommands</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/command-line-flags">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/command-line-subcommands
generated
4
public/command-line-subcommands
generated
@ -249,9 +249,11 @@ way to parameterize programs.</p>
|
|||||||
Next example: <a href="environment-variables">Environment Variables</a>.
|
Next example: <a href="environment-variables">Environment Variables</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/command-line-subcommands">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/constants
generated
4
public/constants
generated
@ -172,9 +172,11 @@ assignment or function call. For example, here
|
|||||||
Next example: <a href="for">For</a>.
|
Next example: <a href="for">For</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/constants">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/context
generated
4
public/context
generated
@ -194,9 +194,11 @@ cancellation.</p>
|
|||||||
Next example: <a href="spawning-processes">Spawning Processes</a>.
|
Next example: <a href="spawning-processes">Spawning Processes</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/context">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/defer
generated
4
public/defer
generated
@ -198,9 +198,11 @@ after being written.</p>
|
|||||||
Next example: <a href="recover">Recover</a>.
|
Next example: <a href="recover">Recover</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/defer">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/directories
generated
4
public/directories
generated
@ -336,9 +336,11 @@ recursively by <code>filepath.Walk</code>.</p>
|
|||||||
Next example: <a href="temporary-files-and-directories">Temporary Files and Directories</a>.
|
Next example: <a href="temporary-files-and-directories">Temporary Files and Directories</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/directories">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/environment-variables
generated
4
public/environment-variables
generated
@ -174,9 +174,11 @@ program picks that value up.</p>
|
|||||||
Next example: <a href="http-clients">HTTP Clients</a>.
|
Next example: <a href="http-clients">HTTP Clients</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/environment-variables">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/epoch
generated
4
public/epoch
generated
@ -166,9 +166,11 @@ parsing and formatting.</p>
|
|||||||
Next example: <a href="time-formatting-parsing">Time Formatting / Parsing</a>.
|
Next example: <a href="time-formatting-parsing">Time Formatting / Parsing</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/epoch">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/errors
generated
4
public/errors
generated
@ -285,9 +285,11 @@ on the Go blog for more on error handling.</p>
|
|||||||
Next example: <a href="goroutines">Goroutines</a>.
|
Next example: <a href="goroutines">Goroutines</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/errors">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/execing-processes
generated
4
public/execing-processes
generated
@ -193,9 +193,11 @@ processes covers most use cases for <code>fork</code>.</p>
|
|||||||
Next example: <a href="signals">Signals</a>.
|
Next example: <a href="signals">Signals</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/execing-processes">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/exit
generated
4
public/exit
generated
@ -159,9 +159,11 @@ the status in the terminal.</p>
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/exit">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/file-paths
generated
4
public/file-paths
generated
@ -238,9 +238,11 @@ be made relative to base.</p>
|
|||||||
Next example: <a href="directories">Directories</a>.
|
Next example: <a href="directories">Directories</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/file-paths">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/for
generated
4
public/for
generated
@ -184,9 +184,11 @@ structures.</p>
|
|||||||
Next example: <a href="if-else">If/Else</a>.
|
Next example: <a href="if-else">If/Else</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/for">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/functions
generated
4
public/functions
generated
@ -181,9 +181,11 @@ multiple return values, which we’ll look at next.</p>
|
|||||||
Next example: <a href="multiple-return-values">Multiple Return Values</a>.
|
Next example: <a href="multiple-return-values">Multiple Return Values</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/functions">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/goroutines
generated
4
public/goroutines
generated
@ -197,9 +197,11 @@ concurrent Go programs: channels.</p>
|
|||||||
Next example: <a href="channels">Channels</a>.
|
Next example: <a href="channels">Channels</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/goroutines">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/hello-world
generated
4
public/hello-world
generated
@ -124,9 +124,11 @@ learn more about the language.</p>
|
|||||||
Next example: <a href="values">Values</a>.
|
Next example: <a href="values">Values</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/hello-world">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/http-clients
generated
4
public/http-clients
generated
@ -158,9 +158,11 @@ settings.</p>
|
|||||||
Next example: <a href="http-servers">HTTP Servers</a>.
|
Next example: <a href="http-servers">HTTP Servers</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/http-clients">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/http-servers
generated
4
public/http-servers
generated
@ -199,9 +199,11 @@ router we’ve just set up.</p>
|
|||||||
Next example: <a href="context">Context</a>.
|
Next example: <a href="context">Context</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/http-servers">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/if-else
generated
4
public/if-else
generated
@ -173,9 +173,11 @@ for basic conditions.</p>
|
|||||||
Next example: <a href="switch">Switch</a>.
|
Next example: <a href="switch">Switch</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/if-else">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
2
public/index.html
generated
2
public/index.html
generated
@ -180,9 +180,11 @@
|
|||||||
<li><a href="exit">Exit</a></li>
|
<li><a href="exit">Exit</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
4
public/interfaces
generated
4
public/interfaces
generated
@ -225,9 +225,11 @@ these structs as arguments to <code>measure</code>.</p>
|
|||||||
Next example: <a href="errors">Errors</a>.
|
Next example: <a href="errors">Errors</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/interfaces">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/json
generated
4
public/json
generated
@ -401,9 +401,11 @@ for more.</p>
|
|||||||
Next example: <a href="xml">XML</a>.
|
Next example: <a href="xml">XML</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/json">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/line-filters
generated
4
public/line-filters
generated
@ -192,9 +192,11 @@ lowercase lines.</p>
|
|||||||
Next example: <a href="file-paths">File Paths</a>.
|
Next example: <a href="file-paths">File Paths</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/line-filters">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/maps
generated
4
public/maps
generated
@ -222,9 +222,11 @@ printed with <code>fmt.Println</code>.</p>
|
|||||||
Next example: <a href="range">Range</a>.
|
Next example: <a href="range">Range</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/maps">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/methods
generated
4
public/methods
generated
@ -185,9 +185,11 @@ naming related sets of methods: interfaces.</p>
|
|||||||
Next example: <a href="interfaces">Interfaces</a>.
|
Next example: <a href="interfaces">Interfaces</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/methods">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/multiple-return-values
generated
4
public/multiple-return-values
generated
@ -155,9 +155,11 @@ feature of Go functions; we’ll look at this next.</p>
|
|||||||
Next example: <a href="variadic-functions">Variadic Functions</a>.
|
Next example: <a href="variadic-functions">Variadic Functions</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/multiple-return-values">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/mutexes
generated
4
public/mutexes
generated
@ -287,9 +287,11 @@ management task using only goroutines and channels.</p>
|
|||||||
Next example: <a href="stateful-goroutines">Stateful Goroutines</a>.
|
Next example: <a href="stateful-goroutines">Stateful Goroutines</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/mutexes">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/non-blocking-channel-operations
generated
4
public/non-blocking-channel-operations
generated
@ -165,9 +165,11 @@ on both <code>messages</code> and <code>signals</code>.</p>
|
|||||||
Next example: <a href="closing-channels">Closing Channels</a>.
|
Next example: <a href="closing-channels">Closing Channels</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/non-blocking-channel-operations">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/number-parsing
generated
4
public/number-parsing
generated
@ -203,9 +203,11 @@ bits.</p>
|
|||||||
Next example: <a href="url-parsing">URL Parsing</a>.
|
Next example: <a href="url-parsing">URL Parsing</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/number-parsing">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/panic
generated
4
public/panic
generated
@ -174,9 +174,11 @@ to use error-indicating return values wherever possible.</p>
|
|||||||
Next example: <a href="defer">Defer</a>.
|
Next example: <a href="defer">Defer</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/panic">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/pointers
generated
4
public/pointers
generated
@ -182,9 +182,11 @@ the memory address for that variable.</p>
|
|||||||
Next example: <a href="structs">Structs</a>.
|
Next example: <a href="structs">Structs</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/pointers">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/random-numbers
generated
4
public/random-numbers
generated
@ -218,9 +218,11 @@ that Go can provide.</p>
|
|||||||
Next example: <a href="number-parsing">Number Parsing</a>.
|
Next example: <a href="number-parsing">Number Parsing</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/random-numbers">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/range
generated
4
public/range
generated
@ -189,9 +189,11 @@ of the <code>rune</code> and the second the <code>rune</code> itself.</p>
|
|||||||
Next example: <a href="functions">Functions</a>.
|
Next example: <a href="functions">Functions</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/range">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/range-over-channels
generated
4
public/range-over-channels
generated
@ -143,9 +143,11 @@ values be received.</p>
|
|||||||
Next example: <a href="timers">Timers</a>.
|
Next example: <a href="timers">Timers</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/range-over-channels">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/rate-limiting
generated
4
public/rate-limiting
generated
@ -250,9 +250,11 @@ then serve the remaining 2 with ~200ms delays each.</p>
|
|||||||
Next example: <a href="atomic-counters">Atomic Counters</a>.
|
Next example: <a href="atomic-counters">Atomic Counters</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/rate-limiting">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/reading-files
generated
4
public/reading-files
generated
@ -275,9 +275,11 @@ be scheduled immediately after <code>Open</code>ing with
|
|||||||
Next example: <a href="writing-files">Writing Files</a>.
|
Next example: <a href="writing-files">Writing Files</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/reading-files">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/recover
generated
4
public/recover
generated
@ -183,9 +183,11 @@ panic and resumes in the deferred closure.</p>
|
|||||||
Next example: <a href="collection-functions">Collection Functions</a>.
|
Next example: <a href="collection-functions">Collection Functions</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/recover">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/recursion
generated
4
public/recursion
generated
@ -170,9 +170,11 @@ knows which function to call with <code>fib</code> here.</p>
|
|||||||
Next example: <a href="pointers">Pointers</a>.
|
Next example: <a href="pointers">Pointers</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/recursion">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/regular-expressions
generated
4
public/regular-expressions
generated
@ -332,9 +332,11 @@ the <a href="http://golang.org/pkg/regexp/"><code>regexp</code></a> package docs
|
|||||||
Next example: <a href="json">JSON</a>.
|
Next example: <a href="json">JSON</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/regular-expressions">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/select
generated
4
public/select
generated
@ -172,9 +172,11 @@ concurrently.</p>
|
|||||||
Next example: <a href="timeouts">Timeouts</a>.
|
Next example: <a href="timeouts">Timeouts</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/select">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/sha1-hashes
generated
4
public/sha1-hashes
generated
@ -194,9 +194,11 @@ you should carefully research
|
|||||||
Next example: <a href="base64-encoding">Base64 Encoding</a>.
|
Next example: <a href="base64-encoding">Base64 Encoding</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/sha1-hashes">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/signals
generated
4
public/signals
generated
@ -178,9 +178,11 @@ causing the program to print <code>interrupt</code> and then exit.</p>
|
|||||||
Next example: <a href="exit">Exit</a>.
|
Next example: <a href="exit">Exit</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/signals">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/slices
generated
4
public/slices
generated
@ -298,9 +298,11 @@ Go’s other key builtin data structure: maps.</p>
|
|||||||
Next example: <a href="maps">Maps</a>.
|
Next example: <a href="maps">Maps</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/slices">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/sorting
generated
4
public/sorting
generated
@ -150,9 +150,11 @@ slices and <code>true</code> as the result of our <code>AreSorted</code> test.</
|
|||||||
Next example: <a href="sorting-by-functions">Sorting by Functions</a>.
|
Next example: <a href="sorting-by-functions">Sorting by Functions</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/sorting">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/sorting-by-functions
generated
4
public/sorting-by-functions
generated
@ -168,9 +168,11 @@ functions.</p>
|
|||||||
Next example: <a href="panic">Panic</a>.
|
Next example: <a href="panic">Panic</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/sorting-by-functions">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/spawning-processes
generated
4
public/spawning-processes
generated
@ -241,9 +241,11 @@ as if we had run them directly from the command-line.</p>
|
|||||||
Next example: <a href="execing-processes">Exec'ing Processes</a>.
|
Next example: <a href="execing-processes">Exec'ing Processes</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/spawning-processes">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/stateful-goroutines
generated
4
public/stateful-goroutines
generated
@ -302,9 +302,11 @@ program.</p>
|
|||||||
Next example: <a href="sorting">Sorting</a>.
|
Next example: <a href="sorting">Sorting</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/stateful-goroutines">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/string-formatting
generated
4
public/string-formatting
generated
@ -445,9 +445,11 @@ and returns a string without printing it anywhere.</p>
|
|||||||
Next example: <a href="regular-expressions">Regular Expressions</a>.
|
Next example: <a href="regular-expressions">Regular Expressions</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/string-formatting">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/string-functions
generated
4
public/string-functions
generated
@ -196,9 +196,11 @@ for more information.</p>
|
|||||||
Next example: <a href="string-formatting">String Formatting</a>.
|
Next example: <a href="string-formatting">String Formatting</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/string-functions">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/structs
generated
4
public/structs
generated
@ -255,9 +255,11 @@ pointers are automatically dereferenced.</p>
|
|||||||
Next example: <a href="methods">Methods</a>.
|
Next example: <a href="methods">Methods</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/structs">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/switch
generated
4
public/switch
generated
@ -192,9 +192,11 @@ type corresponding to its clause.</p>
|
|||||||
Next example: <a href="arrays">Arrays</a>.
|
Next example: <a href="arrays">Arrays</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/switch">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/temporary-files-and-directories
generated
4
public/temporary-files-and-directories
generated
@ -228,9 +228,11 @@ prefixing them with our temporary directory.</p>
|
|||||||
Next example: <a href="testing">Testing</a>.
|
Next example: <a href="testing">Testing</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/temporary-files-and-directories">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/testing
generated
4
public/testing
generated
@ -221,9 +221,11 @@ when executing <code>go test -v</code>.</p>
|
|||||||
Next example: <a href="command-line-arguments">Command-Line Arguments</a>.
|
Next example: <a href="command-line-arguments">Command-Line Arguments</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/testing">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/tickers
generated
4
public/tickers
generated
@ -160,9 +160,11 @@ before we stop it.</p>
|
|||||||
Next example: <a href="worker-pools">Worker Pools</a>.
|
Next example: <a href="worker-pools">Worker Pools</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/tickers">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/time
generated
4
public/time
generated
@ -259,9 +259,11 @@ the Unix epoch.</p>
|
|||||||
Next example: <a href="epoch">Epoch</a>.
|
Next example: <a href="epoch">Epoch</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/time">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/time-formatting-parsing
generated
4
public/time-formatting-parsing
generated
@ -193,9 +193,11 @@ explaining the parsing problem.</p>
|
|||||||
Next example: <a href="random-numbers">Random Numbers</a>.
|
Next example: <a href="random-numbers">Random Numbers</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/time-formatting-parsing">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/timeouts
generated
4
public/timeouts
generated
@ -171,9 +171,11 @@ out and the second succeeding.</p>
|
|||||||
Next example: <a href="non-blocking-channel-operations">Non-Blocking Channel Operations</a>.
|
Next example: <a href="non-blocking-channel-operations">Non-Blocking Channel Operations</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/timeouts">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/timers
generated
4
public/timers
generated
@ -174,9 +174,11 @@ a chance to fire.</p>
|
|||||||
Next example: <a href="tickers">Tickers</a>.
|
Next example: <a href="tickers">Tickers</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/timers">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/url-parsing
generated
4
public/url-parsing
generated
@ -225,9 +225,11 @@ pieces that we extracted.</p>
|
|||||||
Next example: <a href="sha1-hashes">SHA1 Hashes</a>.
|
Next example: <a href="sha1-hashes">SHA1 Hashes</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/url-parsing">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/values
generated
4
public/values
generated
@ -141,9 +141,11 @@ basic examples.</p>
|
|||||||
Next example: <a href="variables">Variables</a>.
|
Next example: <a href="variables">Variables</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/values">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/variables
generated
4
public/variables
generated
@ -172,9 +172,11 @@ initializing a variable, e.g. for
|
|||||||
Next example: <a href="constants">Constants</a>.
|
Next example: <a href="constants">Constants</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/variables">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/variadic-functions
generated
4
public/variadic-functions
generated
@ -161,9 +161,11 @@ to form closures, which we’ll look at next.</p>
|
|||||||
Next example: <a href="closures">Closures</a>.
|
Next example: <a href="closures">Closures</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/variadic-functions">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/waitgroups
generated
4
public/waitgroups
generated
@ -232,9 +232,11 @@ is likely to be different for each invocation.</p>
|
|||||||
Next example: <a href="rate-limiting">Rate Limiting</a>.
|
Next example: <a href="rate-limiting">Rate Limiting</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/waitgroups">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/worker-pools
generated
4
public/worker-pools
generated
@ -212,9 +212,11 @@ there are 3 workers operating concurrently.</p>
|
|||||||
Next example: <a href="waitgroups">WaitGroups</a>.
|
Next example: <a href="waitgroups">WaitGroups</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/worker-pools">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/writing-files
generated
4
public/writing-files
generated
@ -275,9 +275,11 @@ we’ve just seen to the <code>stdin</code> and <code>stdout</code> streams.
|
|||||||
Next example: <a href="line-filters">Line Filters</a>.
|
Next example: <a href="line-filters">Line Filters</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/writing-files">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
4
public/xml
generated
4
public/xml
generated
@ -266,9 +266,11 @@ to nest all <code>plant</code>s under <code><parent><child>...</code
|
|||||||
Next example: <a href="time">Time</a>.
|
Next example: <a href="time">Time</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/xml">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
@ -42,9 +42,7 @@
|
|||||||
Next example: <a href="{{.NextExample.ID}}">{{.NextExample.Name}}</a>.
|
Next example: <a href="{{.NextExample.ID}}">{{.NextExample.Name}}</a>.
|
||||||
</p>
|
</p>
|
||||||
{{end}}
|
{{end}}
|
||||||
<p class="footer">
|
{{ template "footer" }}
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample/blob/master/examples/{{.ID}}">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var codeLines = [];
|
var codeLines = [];
|
||||||
|
5
templates/footer.tmpl
Normal file
5
templates/footer.tmpl
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{{define "footer"}}
|
||||||
|
<p class="footer">
|
||||||
|
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
||||||
|
</p>
|
||||||
|
{{end}}
|
@ -30,9 +30,7 @@
|
|||||||
<li><a href="{{.ID}}">{{.Name}}</a></li>
|
<li><a href="{{.ID}}">{{.Name}}</a></li>
|
||||||
{{end}}
|
{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
<p class="footer">
|
{{ template "footer" }}
|
||||||
by <a href="https://markmcgranaghan.com">Mark McGranaghan</a> and <a href="https://eli.thegreenplace.net">Eli Bendersky</a> | <a href="https://github.com/mmcgrana/gobyexample">source</a> | <a href="https://github.com/mmcgrana/gobyexample#license">license</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -307,7 +307,9 @@ func renderIndex(examples []*Example) {
|
|||||||
fmt.Println("Rendering index")
|
fmt.Println("Rendering index")
|
||||||
}
|
}
|
||||||
indexTmpl := template.New("index")
|
indexTmpl := template.New("index")
|
||||||
_, err := indexTmpl.Parse(mustReadFile("templates/index.tmpl"))
|
_, err := indexTmpl.Parse(mustReadFile("templates/footer.tmpl"))
|
||||||
|
check(err)
|
||||||
|
_, err = indexTmpl.Parse(mustReadFile("templates/index.tmpl"))
|
||||||
check(err)
|
check(err)
|
||||||
indexF, err := os.Create(siteDir + "/index.html")
|
indexF, err := os.Create(siteDir + "/index.html")
|
||||||
check(err)
|
check(err)
|
||||||
@ -320,7 +322,9 @@ func renderExamples(examples []*Example) {
|
|||||||
fmt.Println("Rendering examples")
|
fmt.Println("Rendering examples")
|
||||||
}
|
}
|
||||||
exampleTmpl := template.New("example")
|
exampleTmpl := template.New("example")
|
||||||
_, err := exampleTmpl.Parse(mustReadFile("templates/example.tmpl"))
|
_, err := exampleTmpl.Parse(mustReadFile("templates/footer.tmpl"))
|
||||||
|
check(err)
|
||||||
|
_, err = exampleTmpl.Parse(mustReadFile("templates/example.tmpl"))
|
||||||
check(err)
|
check(err)
|
||||||
for _, example := range examples {
|
for _, example := range examples {
|
||||||
exampleF, err := os.Create(siteDir + "/" + example.ID)
|
exampleF, err := os.Create(siteDir + "/" + example.ID)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user