diff options
| author | Shulhan <ms@kilabit.info> | 2024-01-25 19:32:48 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-01-25 19:45:46 +0700 |
| commit | 099ccef4614d8b3ba19f44c50ef984631d161240 (patch) | |
| tree | a31565d4ec4cc911735c086c35da8d89d689ac3e /key_form_input.go | |
| parent | 7d3ce2ca01f2d4954d89430e48ca23c89416668b (diff) | |
| download | gorankusu-099ccef4614d8b3ba19f44c50ef984631d161240.tar.xz | |
all: fix warnings recommended by linter revive
Most of the fixes related to naming variables with acronyms, for example
HTTP, JSON, URL, and so on.
Diffstat (limited to 'key_form_input.go')
| -rw-r--r-- | key_form_input.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/key_form_input.go b/key_form_input.go index e457466..afcbce7 100644 --- a/key_form_input.go +++ b/key_form_input.go @@ -15,8 +15,8 @@ import ( // 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) { +// ToHTTPHeader convert the KeyFormInputs to the standard http.Header. +func (kfi KeyFormInput) ToHTTPHeader() (headers http.Header) { headers = http.Header{} if len(kfi) == 0 { return headers @@ -27,10 +27,10 @@ func (kfi KeyFormInput) ToHttpHeader() (headers http.Header) { return headers } -// ToJsonObject convert the KeyFormInput into JSON object. +// ToJSONObject convert the KeyFormInput into JSON object. // FormInput with Kind is FormInputKindBoolean will be converted to true if // the Value is either "true", "yes", or "1". -func (kfi KeyFormInput) ToJsonObject() (data map[string]interface{}) { +func (kfi KeyFormInput) ToJSONObject() (data map[string]interface{}) { var ( k string fi FormInput @@ -69,8 +69,8 @@ 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) { +// ToURLValues convert the KeyFormInput to the standard url.Values. +func (kfi KeyFormInput) ToURLValues() (vals url.Values) { vals = url.Values{} if len(kfi) == 0 { return vals |
