Skip to content

Commit d6d831e

Browse files
committed
👷 fix lint
1 parent 9233932 commit d6d831e

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

Diff for: app.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ func New(config ...Config) *App {
383383
return app
384384
}
385385

386-
// Mount attaches another app instance as a subrouter along a routing path.
386+
// Mount attaches another app instance as a sub-router along a routing path.
387387
// It's very useful to split up a large API as many independent routers and
388388
// compose them as a single service using Mount.
389389
func (app *App) Mount(prefix string, fiber *App) Router {
@@ -663,7 +663,7 @@ func (app *App) Test(req *http.Request, msTimeout ...int) (resp *http.Response,
663663

664664
type disableLogger struct{}
665665

666-
func (dl *disableLogger) Printf(format string, args ...interface{}) {
666+
func (dl *disableLogger) Printf(_ string, _ ...interface{}) {
667667
// fmt.Println(fmt.Sprintf(format, args...))
668668
}
669669

@@ -917,6 +917,5 @@ func (app *App) startupMessage(addr string, tls bool, pids string) {
917917
out = colorable.NewNonColorable(os.Stdout)
918918
}
919919

920-
fmt.Fprintln(out, output)
921-
920+
_, _ = fmt.Fprintln(out, output)
922921
}

Diff for: ctx.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ func (c *Ctx) SendFile(file string, compress ...bool) error {
946946
})
947947

948948
// Keep original path for mutable params
949-
c.pathOriginal = utils.SafeString(c.pathOriginal)
949+
c.pathOriginal = utils.CopyString(c.pathOriginal)
950950
// Disable compression
951951
if len(compress) <= 0 || !compress[0] {
952952
// https://github.com/valyala/fasthttp/blob/master/fs.go#L46
@@ -1098,7 +1098,7 @@ func (c *Ctx) WriteString(s string) (int, error) {
10981098
// XHR returns a Boolean property, that is true, if the request's X-Requested-With header field is XMLHttpRequest,
10991099
// indicating that the request was issued by a client library (such as jQuery).
11001100
func (c *Ctx) XHR() bool {
1101-
return utils.EqualsFold(utils.UnsafeBytes(c.Get(HeaderXRequestedWith)), []byte("xmlhttprequest"))
1101+
return utils.EqualFoldBytes(utils.UnsafeBytes(c.Get(HeaderXRequestedWith)), []byte("xmlhttprequest"))
11021102
}
11031103

11041104
// prettifyPath ...

Diff for: group.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type Group struct {
1515
prefix string
1616
}
1717

18-
// Mount attaches another app instance as a subrouter along a routing path.
18+
// Mount attaches another app instance as a sub-router along a routing path.
1919
// It's very useful to split up a large API as many independent routers and
2020
// compose them as a single service using Mount.
2121
func (grp *Group) Mount(prefix string, fiber *App) Router {

Diff for: helpers.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,9 @@ func (c *testConn) Close() error { return nil }
364364

365365
func (c *testConn) LocalAddr() net.Addr { return testAddr("local-addr") }
366366
func (c *testConn) RemoteAddr() net.Addr { return testAddr("remote-addr") }
367-
func (c *testConn) SetDeadline(t time.Time) error { return nil }
368-
func (c *testConn) SetReadDeadline(t time.Time) error { return nil }
369-
func (c *testConn) SetWriteDeadline(t time.Time) error { return nil }
367+
func (c *testConn) SetDeadline(_ time.Time) error { return nil }
368+
func (c *testConn) SetReadDeadline(_ time.Time) error { return nil }
369+
func (c *testConn) SetWriteDeadline(_ time.Time) error { return nil }
370370

371371
// getString converts byte slice to a string without memory allocation.
372372
var getString = utils.UnsafeString

0 commit comments

Comments
 (0)