Skip to content

Commit 7a152c2

Browse files
authored
Merge pull request #739 from Fenny/master
📦 bump dependencies
2 parents 5ee927d + f3359f4 commit 7a152c2

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

app.go

+9-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
)
3333

3434
// Version of current package
35-
const Version = "1.14.2"
35+
const Version = "1.14.3"
3636

3737
// Map is a shortcut for map[string]interface{}, useful for JSON returns
3838
type Map map[string]interface{}
@@ -671,18 +671,22 @@ func (app *App) startupMessage(addr string, tls bool, pids string) {
671671
host, port := parseAddr(addr)
672672
var (
673673
tlsStr = "FALSE"
674+
preforkStr = "FALSE"
674675
handlerCount = app.handlerCount
675676
osName = utils.ToUpper(runtime.GOOS)
676-
memTotal = utils.ByteSize(utils.MemoryTotal())
677-
cpuThreads = runtime.NumCPU()
678-
pid = os.Getpid()
677+
678+
cpuThreads = runtime.NumCPU()
679+
pid = os.Getpid()
679680
)
680681
if host == "" {
681682
host = "0.0.0.0"
682683
}
683684
if tls {
684685
tlsStr = "TRUE"
685686
}
687+
if app.Settings.Prefork {
688+
preforkStr = "TRUE"
689+
}
686690
// tabwriter makes sure the spacing are consistent across different values
687691
// colorable handles the escape sequence for stdout using ascii color codes
688692
var out *tabwriter.Writer
@@ -701,7 +705,7 @@ func (app *App) startupMessage(addr string, tls bool, pids string) {
701705
fmt.Fprintf(out, logo, cBlack, cBlack,
702706
cCyan, cBlack, fmt.Sprintf(" HOST %s\tOS %s", cyan(host), cyan(osName)),
703707
cCyan, cBlack, fmt.Sprintf(" PORT %s\tTHREADS %s", cyan(port), cyan(cpuThreads)),
704-
cCyan, cBlack, fmt.Sprintf(" TLS %s\tMEM %s", cyan(tlsStr), cyan(memTotal)),
708+
cCyan, cBlack, fmt.Sprintf(" TLS %s\tMEM %s", cyan(tlsStr), cyan(preforkStr)),
705709
cBlack, cyan(Version), fmt.Sprintf(" HANDLERS %s\t\t\t PID %s%s%s\n", cyan(handlerCount), cyan(pid), pids, cReset),
706710
)
707711
// Write to io.write

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ module github.com/gofiber/fiber
33
go 1.11
44

55
require (
6-
github.com/gofiber/utils v0.0.9
6+
github.com/gofiber/utils v0.0.10
77
github.com/gorilla/schema v1.1.0
88
github.com/mattn/go-colorable v0.1.7
99
github.com/mattn/go-isatty v0.0.12
1010
github.com/valyala/bytebufferpool v1.0.0
11-
github.com/valyala/fasthttp v1.15.1
11+
github.com/valyala/fasthttp v1.16.0
1212
)

go.sum

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4=
22
github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
3-
github.com/gofiber/utils v0.0.9 h1:Bu4grjEB4zof1TtpmPCG6MeX5nGv8SaQfzaUgjkf3H8=
4-
github.com/gofiber/utils v0.0.9/go.mod h1:9J5aHFUIjq0XfknT4+hdSMG6/jzfaAgCu4HEbWDeBlo=
3+
github.com/gofiber/utils v0.0.10 h1:3Mr7X7JdCUo7CWf/i5sajSaDmArEDtti8bM1JUVso2U=
4+
github.com/gofiber/utils v0.0.10/go.mod h1:9J5aHFUIjq0XfknT4+hdSMG6/jzfaAgCu4HEbWDeBlo=
55
github.com/gorilla/schema v1.1.0 h1:CamqUDOFUBqzrvxuz2vEwo8+SUdwsluFh7IlzJh30LY=
66
github.com/gorilla/schema v1.1.0/go.mod h1:kgLaKoK1FELgZqMAVxx/5cbj0kT+57qxUrAlIO2eleU=
77
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
1212
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
1313
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
1414
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
15-
github.com/valyala/fasthttp v1.15.1 h1:eRb5jzWhbCn/cGu3gNJMcOfPUfXgXCcQIOHjh9ajAS8=
16-
github.com/valyala/fasthttp v1.15.1/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA=
15+
github.com/valyala/fasthttp v1.16.0 h1:9zAqOYLl8Tuy3E5R6ckzGDJ1g8+pw15oQp2iL9Jl6gQ=
16+
github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA=
1717
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a h1:0R4NLDRDZX6JcmhJgXi5E4b8Wg84ihbmUKp/GvSPEzc=
1818
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
1919
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=

middleware/logger.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ func logger(config LoggerConfig) fiber.Handler {
217217
if strings.Contains(config.Format, "${time}") {
218218
go func() {
219219
for {
220-
time.Sleep(time.Millisecond)
220+
time.Sleep(450 * time.Millisecond)
221221
timestamp.Store(nowTimeString(config.timeZoneLocation, config.TimeFormat))
222222
}
223223
}()

0 commit comments

Comments
 (0)