Co-authored-by: Gabriel Vasile <gabriel.vasile@email.com>
This commit is contained in:
parent
e89b9ffb30
commit
dcb87a39b7
1 changed files with 2 additions and 9 deletions
|
@ -2,7 +2,6 @@ package main
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"regexp"
|
||||
|
@ -295,19 +294,13 @@ func handleTestSMTPSettings(c echo.Context) error {
|
|||
}
|
||||
|
||||
func handleGetAboutInfo(c echo.Context) error {
|
||||
app := c.Get("app").(*App)
|
||||
|
||||
var (
|
||||
mem runtime.MemStats
|
||||
utsname syscall.Utsname
|
||||
app = c.Get("app").(*App)
|
||||
mem runtime.MemStats
|
||||
)
|
||||
|
||||
runtime.ReadMemStats(&mem)
|
||||
|
||||
if err := syscall.Uname(&utsname); err != nil {
|
||||
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Errorf("error getting system info: %v", err))
|
||||
}
|
||||
|
||||
out := app.about
|
||||
out.System.AllocMB = mem.Alloc / 1024 / 1024
|
||||
out.System.OSMB = mem.Sys / 1024 / 1024
|
||||
|
|
Loading…
Reference in a new issue