Jerry 7 vuotta sitten
vanhempi
commit
55b3d14df2
1 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 5 5
      util.go

+ 5 - 5
util.go

@@ -8,6 +8,11 @@ import (
 
 
 type requestBody map[string]string
 type requestBody map[string]string
 
 
+//设置参数
+func (w requestBody) Set(key string, value string) {
+	w[key] = value
+}
+
 //获取参数
 //获取参数
 func (w requestBody) Get(key string) string {
 func (w requestBody) Get(key string) string {
 	if w == nil {
 	if w == nil {
@@ -17,11 +22,6 @@ func (w requestBody) Get(key string) string {
 	return ws
 	return ws
 }
 }
 
 
-//设置参数
-func (w requestBody) Set(key string, value string) {
-	w[key] = value
-}
-
 //删除参数
 //删除参数
 func (w requestBody) Remove(key string) {
 func (w requestBody) Remove(key string) {
 	delete(w, key)
 	delete(w, key)