blob: 953ca285adc03435e5828b762875c9a4e8b86958 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package app
import (
"io/ioutil"
"net/http"
"github.com/mattermost/mattermost-server/plugin/pluginenv"
)
type App struct {
Srv *Server
PluginEnv *pluginenv.Environment
}
var globalApp App
func Global() *App {
return &globalApp
}
func CloseBody(r *http.Response) {
if r.Body != nil {
ioutil.ReadAll(r.Body)
r.Body.Close()
}
}
|