]> Cypherpunks repositories - gostls13.git/commitdiff
doc/articles/wiki: highlight the use of _ warning
authorAgniva De Sarker <agnivade@yahoo.co.in>
Thu, 11 Jan 2018 16:49:01 +0000 (22:19 +0530)
committerIan Lance Taylor <iant@golang.org>
Wed, 14 Feb 2018 04:54:37 +0000 (04:54 +0000)
This moves the paragraph mentioning the use of _ higher up
to emphasize the warning and thereby reducing chances of getting
stuck.

Fixes #22617

Change-Id: I64352a3e966a22d86fc9d381332bade49d74714a
Reviewed-on: https://go-review.googlesource.com/87375
Reviewed-by: Ian Lance Taylor <iant@golang.org>
doc/articles/wiki/index.html

index 3e0d532d7f7bceb04c23e2bca02ba2ea6c04f6c4..b7ab2cc622fd5017b3ee7260e8a800512e32b899 100644 (file)
@@ -268,6 +268,12 @@ view a wiki page. It will handle URLs prefixed with "/view/".
 
 {{code "doc/articles/wiki/part2.go" `/^func viewHandler/` `/^}/`}}
 
+<p>
+Again, note the use of <code>_</code> to ignore the <code>error</code>
+return value from <code>loadPage</code>. This is done here for simplicity
+and generally considered bad practice. We will attend to this later.
+</p>
+
 <p>
 First, this function extracts the page title from <code>r.URL.Path</code>,
 the path component of the request URL.
@@ -282,12 +288,6 @@ The function then loads the page data, formats the page with a string of simple
 HTML, and writes it to <code>w</code>, the <code>http.ResponseWriter</code>.
 </p>
 
-<p>
-Again, note the use of <code>_</code> to ignore the <code>error</code>
-return value from <code>loadPage</code>. This is done here for simplicity
-and generally considered bad practice. We will attend to this later.
-</p>
-
 <p>
 To use this handler, we rewrite our <code>main</code> function to
 initialize <code>http</code> using the <code>viewHandler</code> to handle