diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-03-21 09:55:16 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-21 09:55:16 +0000 |
commit | aafa0af51ff0c9e504486b593d45fcc0e3c778fc (patch) | |
tree | 92f4aaf0ee8855385780d4e6d35adca44634eba0 /service/http/uploads.go | |
parent | ca497b21bcc33361867d16e1709c55f0313128a7 (diff) | |
parent | a3f07d7bc55031cacccfd3dcbdf93d7e53d3479c (diff) |
Merge #282
282: Replace std json package with github.com/json-iterator/go r=48d90782 a=48d90782
resolves #281
1. Add `go vendor` command to Makefile as workaround for php vendor folder + go vendor folder hack
2. Use faster json package instead of std
3. Update GHA
Co-authored-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'service/http/uploads.go')
-rw-r--r-- | service/http/uploads.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/service/http/uploads.go b/service/http/uploads.go index 8a46f230..39a9eaf2 100644 --- a/service/http/uploads.go +++ b/service/http/uploads.go @@ -1,8 +1,8 @@ package http import ( - "encoding/json" "fmt" + json "github.com/json-iterator/go" "github.com/sirupsen/logrus" "io" "io/ioutil" @@ -42,7 +42,8 @@ type Uploads struct { // MarshalJSON marshal tree tree into JSON. func (u *Uploads) MarshalJSON() ([]byte, error) { - return json.Marshal(u.tree) + j := json.ConfigCompatibleWithStandardLibrary + return j.Marshal(u.tree) } // Open moves all uploaded files to temp directory, return error in case of issue with temp directory. File errors |