mirror of https://github.com/gofiber/fiber.git
📦 bump dependencies
parent
5ee927d5c5
commit
f3359f439a
14
app.go
14
app.go
|
@ -32,7 +32,7 @@ import (
|
|||
)
|
||||
|
||||
// Version of current package
|
||||
const Version = "1.14.2"
|
||||
const Version = "1.14.3"
|
||||
|
||||
// Map is a shortcut for map[string]interface{}, useful for JSON returns
|
||||
type Map map[string]interface{}
|
||||
|
@ -671,11 +671,12 @@ func (app *App) startupMessage(addr string, tls bool, pids string) {
|
|||
host, port := parseAddr(addr)
|
||||
var (
|
||||
tlsStr = "FALSE"
|
||||
preforkStr = "FALSE"
|
||||
handlerCount = app.handlerCount
|
||||
osName = utils.ToUpper(runtime.GOOS)
|
||||
memTotal = utils.ByteSize(utils.MemoryTotal())
|
||||
cpuThreads = runtime.NumCPU()
|
||||
pid = os.Getpid()
|
||||
|
||||
cpuThreads = runtime.NumCPU()
|
||||
pid = os.Getpid()
|
||||
)
|
||||
if host == "" {
|
||||
host = "0.0.0.0"
|
||||
|
@ -683,6 +684,9 @@ func (app *App) startupMessage(addr string, tls bool, pids string) {
|
|||
if tls {
|
||||
tlsStr = "TRUE"
|
||||
}
|
||||
if app.Settings.Prefork {
|
||||
preforkStr = "TRUE"
|
||||
}
|
||||
// tabwriter makes sure the spacing are consistent across different values
|
||||
// colorable handles the escape sequence for stdout using ascii color codes
|
||||
var out *tabwriter.Writer
|
||||
|
@ -701,7 +705,7 @@ func (app *App) startupMessage(addr string, tls bool, pids string) {
|
|||
fmt.Fprintf(out, logo, cBlack, cBlack,
|
||||
cCyan, cBlack, fmt.Sprintf(" HOST %s\tOS %s", cyan(host), cyan(osName)),
|
||||
cCyan, cBlack, fmt.Sprintf(" PORT %s\tTHREADS %s", cyan(port), cyan(cpuThreads)),
|
||||
cCyan, cBlack, fmt.Sprintf(" TLS %s\tMEM %s", cyan(tlsStr), cyan(memTotal)),
|
||||
cCyan, cBlack, fmt.Sprintf(" TLS %s\tMEM %s", cyan(tlsStr), cyan(preforkStr)),
|
||||
cBlack, cyan(Version), fmt.Sprintf(" HANDLERS %s\t\t\t PID %s%s%s\n", cyan(handlerCount), cyan(pid), pids, cReset),
|
||||
)
|
||||
// Write to io.write
|
||||
|
|
4
go.mod
4
go.mod
|
@ -3,10 +3,10 @@ module github.com/gofiber/fiber
|
|||
go 1.11
|
||||
|
||||
require (
|
||||
github.com/gofiber/utils v0.0.9
|
||||
github.com/gofiber/utils v0.0.10
|
||||
github.com/gorilla/schema v1.1.0
|
||||
github.com/mattn/go-colorable v0.1.7
|
||||
github.com/mattn/go-isatty v0.0.12
|
||||
github.com/valyala/bytebufferpool v1.0.0
|
||||
github.com/valyala/fasthttp v1.15.1
|
||||
github.com/valyala/fasthttp v1.16.0
|
||||
)
|
||||
|
|
8
go.sum
8
go.sum
|
@ -1,7 +1,7 @@
|
|||
github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4=
|
||||
github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
|
||||
github.com/gofiber/utils v0.0.9 h1:Bu4grjEB4zof1TtpmPCG6MeX5nGv8SaQfzaUgjkf3H8=
|
||||
github.com/gofiber/utils v0.0.9/go.mod h1:9J5aHFUIjq0XfknT4+hdSMG6/jzfaAgCu4HEbWDeBlo=
|
||||
github.com/gofiber/utils v0.0.10 h1:3Mr7X7JdCUo7CWf/i5sajSaDmArEDtti8bM1JUVso2U=
|
||||
github.com/gofiber/utils v0.0.10/go.mod h1:9J5aHFUIjq0XfknT4+hdSMG6/jzfaAgCu4HEbWDeBlo=
|
||||
github.com/gorilla/schema v1.1.0 h1:CamqUDOFUBqzrvxuz2vEwo8+SUdwsluFh7IlzJh30LY=
|
||||
github.com/gorilla/schema v1.1.0/go.mod h1:kgLaKoK1FELgZqMAVxx/5cbj0kT+57qxUrAlIO2eleU=
|
||||
github.com/klauspost/compress v1.10.7 h1:7rix8v8GpI3ZBb0nSozFRgbtXKv+hOe+qfEpZqybrAg=
|
||||
|
@ -12,8 +12,8 @@ github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHX
|
|||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasthttp v1.15.1 h1:eRb5jzWhbCn/cGu3gNJMcOfPUfXgXCcQIOHjh9ajAS8=
|
||||
github.com/valyala/fasthttp v1.15.1/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA=
|
||||
github.com/valyala/fasthttp v1.16.0 h1:9zAqOYLl8Tuy3E5R6ckzGDJ1g8+pw15oQp2iL9Jl6gQ=
|
||||
github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA=
|
||||
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a h1:0R4NLDRDZX6JcmhJgXi5E4b8Wg84ihbmUKp/GvSPEzc=
|
||||
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
|
||||
|
|
|
@ -217,7 +217,7 @@ func logger(config LoggerConfig) fiber.Handler {
|
|||
if strings.Contains(config.Format, "${time}") {
|
||||
go func() {
|
||||
for {
|
||||
time.Sleep(time.Millisecond)
|
||||
time.Sleep(450 * time.Millisecond)
|
||||
timestamp.Store(nowTimeString(config.timeZoneLocation, config.TimeFormat))
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Reference in New Issue