added reindexing

This commit is contained in:
ston1th 2019-08-24 17:42:02 +02:00
commit bb22097b7b
17 changed files with 226 additions and 47 deletions

View file

@ -13,6 +13,7 @@ import (
"net/http"
"net/url"
"reflect"
"strconv"
"time"
)
@ -59,7 +60,7 @@ type Context struct {
type webData struct {
Version string
Time int64
Time string
Title string
BodyTitle string
@ -98,7 +99,12 @@ func (c *Context) Exec() {
}
c.Data.User = c.User()
c.Data.Login = c.LoggedOn()
c.Data.Time = time.Since(c.Time).Nanoseconds() / 1e6
t := strconv.Itoa(int(time.Since(c.Time).Nanoseconds()/1e6)) + "ms"
if t == "0ms" {
t = strconv.Itoa(int(time.Since(c.Time).Nanoseconds()/1e5)) + "µs"
}
c.Data.Time = t
if c.Data.Msg != "" {
c.Status(http.StatusBadRequest)