Commit a2bcd381 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

http: make triv.go example compile again

Ideally we'd compile all example files during
the build, though.

Fixes #1660

R=r
CC=golang-dev
https://golang.org/cl/4358049
parent 0f46aaf8
...@@ -56,7 +56,7 @@ func (ctr *Counter) ServeHTTP(w http.ResponseWriter, req *http.Request) { ...@@ -56,7 +56,7 @@ func (ctr *Counter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
var booleanflag = flag.Bool("boolean", true, "another flag for testing") var booleanflag = flag.Bool("boolean", true, "another flag for testing")
func FlagServer(w http.ResponseWriter, req *http.Request) { func FlagServer(w http.ResponseWriter, req *http.Request) {
w.Header.Set("Content-Type", "text/plain; charset=utf-8") w.Header().Set("Content-Type", "text/plain; charset=utf-8")
fmt.Fprint(w, "Flags:\n") fmt.Fprint(w, "Flags:\n")
flag.VisitAll(func(f *flag.Flag) { flag.VisitAll(func(f *flag.Flag) {
if f.Value.String() != f.DefValue { if f.Value.String() != f.DefValue {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment