We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 848e472 + db0c289 commit e262f36Copy full SHA for e262f36
web.go
@@ -366,6 +366,18 @@ func SetStaticDir(dir string) os.Error {
366
return nil
367
}
368
369
+func Urlencode ( data map[string]string ) string {
370
+ var buf bytes.Buffer;
371
+ for k,v := range ( data ) {
372
+ buf.WriteString ( http.URLEscape(k) )
373
+ buf.WriteByte('=' )
374
+ buf.WriteString ( http.URLEscape(v) )
375
+ buf.WriteByte('&' )
376
+ }
377
+ s := buf.String()
378
+ return s[0:len(s) - 1]
379
+}
380
+
381
//copied from go's http package, because it's not public
382
var statusText = map[int]string{
383
http.StatusContinue: "Continue",
0 commit comments