]> Cypherpunks repositories - gostls13.git/commitdiff
http: make triv.go example compile again
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 4 Apr 2011 15:10:26 +0000 (08:10 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 4 Apr 2011 15:10:26 +0000 (08:10 -0700)
Ideally we'd compile all example files during
the build, though.

Fixes #1660

R=r
CC=golang-dev
https://golang.org/cl/4358049

src/pkg/http/triv.go

index 9bea6007b5eff4b54510f8999cd83fcb60393051..bff6a106d972928258c813203612a786daf423e4 100644 (file)
@@ -56,7 +56,7 @@ func (ctr *Counter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
 var booleanflag = flag.Bool("boolean", true, "another flag for testing")
 
 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")
        flag.VisitAll(func(f *flag.Flag) {
                if f.Value.String() != f.DefValue {