func handleGet(w http.ResponseWriter, r *http.Request) { if err := r.ParseForm(); err != nil { log.Print(err) } if len(r.Form) > 0 { for k, v := range r.Form { data.Set(k, strings.Join(v, " ")) } } else { configKeys := data.Keys() for _, k := range configKeys { fmt.Fprintf(w, "Config[%q] = %q\n", k, data.Get(k)) } } }
func Keys() []string { return data.Keys() }