gin-gonic / gin
Showing 3 of 7 files from the diff.

@@ -6,6 +6,7 @@
Loading
6 6
7 7
import (
8 8
	"bytes"
9 +
	"errors"
9 10
	"fmt"
10 11
	"io"
11 12
	"io/ioutil"
@@ -60,7 +61,8 @@
Loading
60 61
				// condition that warrants a panic stack trace.
61 62
				var brokenPipe bool
62 63
				if ne, ok := err.(*net.OpError); ok {
63 -
					if se, ok := ne.Err.(*os.SyscallError); ok {
64 +
					var se *os.SyscallError
65 +
					if errors.As(ne, &se) {
64 66
						if strings.Contains(strings.ToLower(se.Error()), "broken pipe") || strings.Contains(strings.ToLower(se.Error()), "connection reset by peer") {
65 67
							brokenPipe = true
66 68
						}

@@ -5,6 +5,7 @@
Loading
5 5
package binding
6 6
7 7
import (
8 +
	"errors"
8 9
	"net/http"
9 10
)
10 11
@@ -22,7 +23,7 @@
Loading
22 23
	if err := req.ParseForm(); err != nil {
23 24
		return err
24 25
	}
25 -
	if err := req.ParseMultipartForm(defaultMemory); err != nil && err != http.ErrNotMultipart {
26 +
	if err := req.ParseMultipartForm(defaultMemory); err != nil && !errors.Is(err, http.ErrNotMultipart) {
26 27
		return err
27 28
	}
28 29
	if err := mapForm(obj, req.Form); err != nil {

@@ -220,7 +220,8 @@
Loading
220 220
		panic("err is nil")
221 221
	}
222 222
223 -
	parsedError, ok := err.(*Error)
223 +
	var parsedError *Error
224 +
	ok := errors.As(err, &parsedError)
224 225
	if !ok {
225 226
		parsedError = &Error{
226 227
			Err:  err,
@@ -515,7 +516,7 @@
Loading
515 516
		c.formCache = make(url.Values)
516 517
		req := c.Request
517 518
		if err := req.ParseMultipartForm(c.engine.MaxMultipartMemory); err != nil {
518 -
			if err != http.ErrNotMultipart {
519 +
			if !errors.Is(err, http.ErrNotMultipart) {
519 520
				debugPrint("error on parse multipart form array: %v", err)
520 521
			}
521 522
		}
Files Coverage
binding 100.00%
render 92.61%
auth.go 100.00%
context.go 97.99%
debug.go 100.00%
deprecated.go 100.00%
errors.go 100.00%
fs.go 100.00%
gin.go 99.10%
logger.go 100.00%
mode.go 100.00%
path.go 100.00%
recovery.go 98.08%
response_writer.go 93.48%
routergroup.go 100.00%
test_helpers.go 100.00%
tree.go 100.00%
utils.go 96.81%
Project Totals (41 files) 98.76%
1243268791
go-1.15 macos-latest
1243268791
go-1.14 macos-latest
1243268791
nomsgpack go-1.14 macos-latest
1243268791
nomsgpack go-1.13 macos-latest
1243268791
nomsgpack go-1.17 macos-latest
1243268791
nomsgpack go-1.13 ubuntu-latest
1243268791
go-1.16 macos-latest
1243268791
nomsgpack go-1.15 macos-latest
1243268791
nomsgpack go-1.16 macos-latest
1243268791
go-1.17 macos-latest
1243268791
nomsgpack go-1.16 ubuntu-latest
1243268791
nomsgpack go-1.15 ubuntu-latest
1243268791
nomsgpack go-1.17 ubuntu-latest
1243268791
go-1.14 ubuntu-latest
1243268791
go-1.16 ubuntu-latest
1243268791
go-1.15 ubuntu-latest
1243268791
go-1.13 ubuntu-latest
1243268791
go-1.17 ubuntu-latest
1243268791
go-1.13 macos-latest
1243268791
nomsgpack go-1.14 ubuntu-latest
1
coverage:
2
  notify:
3
    gitter:
4
      default:
5
        url: https://webhooks.gitter.im/e/d90dcdeeab2f1e357165
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading