Preparing report...

Report for github.com/OptiServer/fasthttp

A+    Excellent!    Found 33 issues across 84 files

Tweet

gofmt97%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo82%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • fasthttp/header.go
    • Line 1735: warning: cyclomatic complexity 21 of function (*ResponseHeader).parseHeaders() is high (> 15) (gocyclo)
    • Line 1799: warning: cyclomatic complexity 19 of function (*RequestHeader).parseHeaders() is high (> 15) (gocyclo)
    • fasthttp/client.go
    • Line 1051: warning: cyclomatic complexity 27 of function (*HostClient).doNonNilReqResp() is high (> 15) (gocyclo)
    • Line 1963: warning: cyclomatic complexity 27 of function (*pipelineConnClient).writer() is high (> 15) (gocyclo)
    • fasthttp/fs.go
    • Line 669: warning: cyclomatic complexity 27 of function (*fsHandler).handleRequest() is high (> 15) (gocyclo)
    • fasthttp/args_test.go
    • Line 313: warning: cyclomatic complexity 17 of function TestArgsSetGetDel() is high (> 15) (gocyclo)
    • Line 11: warning: cyclomatic complexity 16 of function TestArgsAdd() is high (> 15) (gocyclo)
    • fasthttp/server_test.go
    • Line 698: warning: cyclomatic complexity 21 of function TestServerMultipartFormDataRequest() is high (> 15) (gocyclo)
    • Line 249: warning: cyclomatic complexity 18 of function TestServerResponseBodyStream() is high (> 15) (gocyclo)
    • Line 972: warning: cyclomatic complexity 18 of function TestServerHTTP10ConnectionKeepAlive() is high (> 15) (gocyclo)
    • Line 1280: warning: cyclomatic complexity 16 of function TestCompressHandler() is high (> 15) (gocyclo)
    • fasthttp/header_test.go
    • Line 1206: warning: cyclomatic complexity 22 of function TestResponseHeaderCookie() is high (> 15) (gocyclo)
    • Line 1154: warning: cyclomatic complexity 16 of function TestRequestHeaderVisitAll() is high (> 15) (gocyclo)
    • Line 1102: warning: cyclomatic complexity 16 of function TestResponseHeaderVisitAll() is high (> 15) (gocyclo)

golint100%

Golint is a linter for Go source code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign75%

IneffAssign detects ineffectual assignments in Go code.

    • fasthttp/reuseport/reuseport.go
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: could not import github.com/valyala/tcplisten (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/valyala/tcplisten (invalid package name: "") (ineffassign)
    • fasthttp/examples/fileserver/fileserver.go
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: could not import github.com/OptiServer/fasthttp (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/OptiServer/fasthttp/expvarhandler (invalid package name: "") (ineffassign)
    • fasthttp/fasthttpadaptor/adaptor.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/OptiServer/fasthttp (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/OptiServer/fasthttp (invalid package name: "") (ineffassign)
    • fasthttp/http.go
    • Line 355: warning: bb.B undefined (type ByteBuffer has no field or method B) (ineffassign)
    • Line 382: warning: bb.B undefined (type ByteBuffer has no field or method B) (ineffassign)
    • Line 717: warning: buf.B undefined (type ByteBuffer has no field or method B) (ineffassign)
    • Line 1458: warning: w.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 355: warning: bb.B undefined (type ByteBuffer has no field or method B) (ineffassign)
    • Line 382: warning: bb.B undefined (type ByteBuffer has no field or method B) (ineffassign)
    • Line 717: warning: buf.B undefined (type ByteBuffer has no field or method B) (ineffassign)
    • Line 1458: warning: w.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • fasthttp/http_test.go
    • Line 420: warning: buf.B undefined (type ByteBuffer has no field or method B) (ineffassign)
    • Line 497: warning: buf.B undefined (type ByteBuffer has no field or method B) (ineffassign)
    • Line 498: warning: buf.B undefined (type ByteBuffer has no field or method B) (ineffassign)
    • Line 516: warning: buf.B undefined (type ByteBuffer has no field or method B) (ineffassign)
    • Line 517: warning: buf.B undefined (type ByteBuffer has no field or method B) (ineffassign)
    • fasthttp/stackless/writer.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/valyala/bytebufferpool (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/valyala/bytebufferpool (invalid package name: "") (ineffassign)
    • fasthttp/expvarhandler/expvar.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/OptiServer/fasthttp (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/OptiServer/fasthttp (invalid package name: "") (ineffassign)
    • fasthttp/fs.go
    • Line 143: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 143: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 144: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 144: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 145: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 145: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 146: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 134: warning: path declared but not used (ineffassign)
    • Line 961: warning: zbuf.B undefined (type ByteBuffer has no field or method B) (ineffassign)
    • Line 961: warning: w.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 961: warning: zbuf.B undefined (type ByteBuffer has no field or method B) (ineffassign)
    • Line 965: warning: w.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 143: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 143: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 144: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 144: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 145: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 145: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 146: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 134: warning: path declared but not used (ineffassign)
    • Line 961: warning: zbuf.B undefined (type ByteBuffer has no field or method B) (ineffassign)
    • Line 961: warning: w.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 961: warning: zbuf.B undefined (type ByteBuffer has no field or method B) (ineffassign)
    • Line 965: warning: w.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • fasthttp/bytebuffer_test.go
    • Line 35: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 35: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 36: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 36: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 38: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 39: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • fasthttp/stream.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/OptiServer/fasthttp/fasthttputil (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/OptiServer/fasthttp/fasthttputil (invalid package name: "") (ineffassign)
    • fasthttp/bytebuffer.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/valyala/bytebufferpool (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import github.com/valyala/bytebufferpool (invalid package name: "") (ineffassign)
    • fasthttp/reuseport/reuseport_example_test.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/OptiServer/fasthttp (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/OptiServer/fasthttp/reuseport (invalid package name: "") (ineffassign)
    • fasthttp/pprofhandler/pprof.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/OptiServer/fasthttp (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/OptiServer/fasthttp/fasthttpadaptor (invalid package name: "") (ineffassign)
    • fasthttp/fasthttputil/inmemory_listener_timing_test.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/OptiServer/fasthttp (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/OptiServer/fasthttp/fasthttputil (invalid package name: "") (ineffassign)
    • fasthttp/compress.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/OptiServer/fasthttp/stackless (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/klauspost/compress/flate (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/klauspost/compress/gzip (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/klauspost/compress/zlib (invalid package name: "") (ineffassign)
    • Line 426: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 10: warning: could not import github.com/OptiServer/fasthttp/stackless (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/klauspost/compress/flate (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/klauspost/compress/gzip (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/klauspost/compress/zlib (invalid package name: "") (ineffassign)
    • Line 426: warning: b.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • fasthttp/args.go
    • Line 247: warning: bb.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 247: warning: bb.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 248: warning: bb.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 247: warning: bb.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 247: warning: bb.B undefined (type *ByteBuffer has no field or method B) (ineffassign)
    • Line 248: warning: bb.B undefined (type *ByteBuffer has no field or method B) (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!