added reindexing
This commit is contained in:
parent
407ec638fe
commit
bb22097b7b
17 changed files with 226 additions and 47 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue