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.
1 parent 95980ff commit 2f7d97dCopy full SHA for 2f7d97d
web.go
@@ -345,6 +345,18 @@ func SetStaticDir(dir string) os.Error {
345
return nil
346
}
347
348
+func Urlencode ( data map[string]string ) string {
349
+ var buf bytes.Buffer;
350
+ for k,v := range ( data ) {
351
+ buf.WriteString ( http.URLEscape(k) )
352
+ buf.WriteByte('=' )
353
+ buf.WriteString ( http.URLEscape(v) )
354
+ buf.WriteByte('&' )
355
+ }
356
+ s := buf.String()
357
+ return s[0:len(s) - 1]
358
+}
359
+
360
//copied from go's http package, because it's not public
361
var statusText = map[int]string{
362
http.StatusContinue: "Continue",
0 commit comments