mirror of
https://github.com/golang/go
synced 2024-11-22 02:24:41 -07:00
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
This commit is contained in:
parent
0f46aaf8b3
commit
a2bcd3814d
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user