aboutsummaryrefslogtreecommitdiff
path: root/key_form_input.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-08-21 02:14:04 +0700
committerShulhan <ms@kilabit.info>2022-08-21 02:32:29 +0700
commit6e27a84dba52e68fe7b75df50190934ab96c1946 (patch)
treefbcceae155bb41ff31bfd58e53da9b9183ee4a13 /key_form_input.go
parent644439ff61c46aec81894074203bc7d3c9acc24d (diff)
downloadgorankusu-6e27a84dba52e68fe7b75df50190934ab96c1946.tar.xz
all: reformat with Go 1.19 gofmt
Diffstat (limited to 'key_form_input.go')
-rw-r--r--key_form_input.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/key_form_input.go b/key_form_input.go
index c4f988d..2a8789a 100644
--- a/key_form_input.go
+++ b/key_form_input.go
@@ -10,15 +10,11 @@ import (
"github.com/shuLhan/share/lib/math/big"
)
-//
// KeyFormInput is the simplified type for getting and setting HTTP headers
// and request parameters (either in query or in the parameter body).
-//
type KeyFormInput map[string]FormInput
-//
// ToHttpHeader convert the KeyFormInputs to the standard http.Header.
-//
func (kfi KeyFormInput) ToHttpHeader() (headers http.Header) {
headers = http.Header{}
if kfi == nil || len(kfi) == 0 {
@@ -30,9 +26,7 @@ func (kfi KeyFormInput) ToHttpHeader() (headers http.Header) {
return headers
}
-//
// ToJsonObject convert the KeyFormInput into JSON object.
-//
func (kfi KeyFormInput) ToJsonObject() (data map[string]interface{}) {
data = make(map[string]interface{}, len(kfi))
for k, fi := range kfi {
@@ -46,10 +40,8 @@ func (kfi KeyFormInput) ToJsonObject() (data map[string]interface{}) {
return data
}
-//
// ToMultipartFormData convert the KeyFormInput into map of string and raw
// bytes.
-//
func (kfi KeyFormInput) ToMultipartFormData() (data map[string][]byte) {
data = make(map[string][]byte, len(kfi))
if kfi == nil || len(kfi) == 0 {
@@ -61,9 +53,7 @@ func (kfi KeyFormInput) ToMultipartFormData() (data map[string][]byte) {
return data
}
-//
// ToUrlValues convert the KeyFormInput to the standard url.Values.
-//
func (kfi KeyFormInput) ToUrlValues() (vals url.Values) {
vals = url.Values{}
if kfi == nil || len(kfi) == 0 {