diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-01-25 09:32:42 -0500 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-01-25 09:32:42 -0500 |
commit | d245b29f82a03f1aff966a2fb2100a5703d82f32 (patch) | |
tree | cf204039af74fa2579e0291e9e595f08411b0a7a /app/app.go | |
parent | 8ed665cb76c0763e83a2949c4bdd70153baf72f7 (diff) | |
download | chat-d245b29f82a03f1aff966a2fb2100a5703d82f32.tar.gz chat-d245b29f82a03f1aff966a2fb2100a5703d82f32.tar.bz2 chat-d245b29f82a03f1aff966a2fb2100a5703d82f32.zip |
More app code migration (#5170)
* Migrate admin functions into app package
* More user function refactoring
* Move post functions into app package
Diffstat (limited to 'app/app.go')
-rw-r--r-- | app/app.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/app.go b/app/app.go new file mode 100644 index 000000000..8568c7bba --- /dev/null +++ b/app/app.go @@ -0,0 +1,16 @@ +// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +package app + +import ( + "io/ioutil" + "net/http" +) + +func CloseBody(r *http.Response) { + if r.Body != nil { + ioutil.ReadAll(r.Body) + r.Body.Close() + } +} |