docs: Change Example_webHandler to show variables inline

Currently, users looking at Example_webHandler in godoc do not see the
responsewriter, request, or pagetemplate because only code within in the
function block itself is shown (not the signature, not vars outside).

This CL moves those variables into the code block to attempt to make it
a bit easier to grok at first blush.

Change-Id: I394b369c82253ef6cb0c0bf2f5553377571aeea0
Reviewed-on: https://code-review.googlesource.com/c/38010
Reviewed-by: Tyler Bui-Palsulich <tbp@google.com>
Reviewed-by: kokoro <noreply+kokoro@google.com>
diff --git a/iterator/examples_test.go b/iterator/examples_test.go
index f0edcd4..6381c6f 100644
--- a/iterator/examples_test.go
+++ b/iterator/examples_test.go
@@ -63,7 +63,11 @@
 
 // This example demonstrates how to use Pager to support
 // pagination on a web site.
-func Example_webHandler(w http.ResponseWriter, r *http.Request) {
+func Example_webHandler() {
+	// Assuming some response writer and request per https://golang.org/pkg/net/http/#Handler.
+	var w http.ResponseWriter
+	var r *http.Request
+
 	const pageSize = 25
 	it := client.Items(ctx)
 	var items []int
@@ -79,6 +83,8 @@
 		pageToken,
 	}
 	var buf bytes.Buffer
+	// pageTemplate is a global html/template.Template that is only parsed once, rather than for
+	// every invocation.
 	if err := pageTemplate.Execute(&buf, data); err != nil {
 		http.Error(w, fmt.Sprintf("executing page template: %v", err), http.StatusInternalServerError)
 	}