summaryrefslogtreecommitdiff
path: root/service/http/parse.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-13 13:25:57 +0300
committerWolfy-J <[email protected]>2018-06-13 13:25:57 +0300
commit8b24183daa620bb12edf78f6e81697532cbc92d8 (patch)
tree8f05a885ccacfdb1d26a918a1f39ef6ad03a3f35 /service/http/parse.go
parent142f5e61397811ea83da9989c312e929a291e590 (diff)
more tests
Diffstat (limited to 'service/http/parse.go')
-rw-r--r--service/http/parse.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/service/http/parse.go b/service/http/parse.go
index 0224af41..a7516ca6 100644
--- a/service/http/parse.go
+++ b/service/http/parse.go
@@ -12,7 +12,7 @@ type dataTree map[string]interface{}
type fileTree map[string]interface{}
// parseData parses incoming request body into data tree.
-func parseData(r *http.Request) (dataTree, error) {
+func parseData(r *http.Request) dataTree {
data := make(dataTree)
if r.PostForm != nil {
for k, v := range r.PostForm {
@@ -26,7 +26,7 @@ func parseData(r *http.Request) (dataTree, error) {
}
}
- return data, nil
+ return data
}
// pushes value into data tree.
@@ -61,7 +61,7 @@ func (d dataTree) mount(i []string, v []string) {
}
// parse incoming dataTree request into JSON (including contentMultipart form dataTree)
-func parseUploads(r *http.Request, cfg *UploadsConfig) (*Uploads, error) {
+func parseUploads(r *http.Request, cfg *UploadsConfig) *Uploads {
u := &Uploads{
cfg: cfg,
tree: make(fileTree),
@@ -78,7 +78,7 @@ func parseUploads(r *http.Request, cfg *UploadsConfig) (*Uploads, error) {
u.tree.push(k, files)
}
- return u, nil
+ return u
}
// exists if file exists.