Files
mattermost/app/app.go
2017-09-06 17:12:54 -05:00

27 lines
361 B
Go

// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package app
import (
"io/ioutil"
"net/http"
)
type App struct {
Srv *Server
}
var globalApp App
func Global() *App {
return &globalApp
}
func CloseBody(r *http.Response) {
if r.Body != nil {
ioutil.ReadAll(r.Body)
r.Body.Close()
}
}