File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- version : 2
1+ version : " 2 "
22
33run :
4- timeout : 5m
5- tests : true
4+ timeout : 5m
5+ tests : true
66
77linters :
8- disable-all : true
9- enable :
10- - errcheck
11- - govet
12- - staticcheck
13- - errorlint
14- - errname
15- - bodyclose
16- - sqlclosecheck
17- - noctx
18- - ineffassign
19- - unconvert
20- - bidichk
21-
22- linters-settings :
8+ default : none
9+ enable :
10+ - errcheck
11+ - govet
12+ - staticcheck
13+ - errorlint
14+ - errname
15+ - bodyclose
16+ - sqlclosecheck
17+ - noctx
18+ - ineffassign
19+ - unconvert
20+ - bidichk
21+ settings :
2322 errcheck :
24- check-type-assertions : true
25- check-blank : true
26-
23+ check-type-assertions : true
24+ check-blank : false
25+ exclude-functions :
26+ - fmt.Print
27+ - fmt.Println
28+ - fmt.Printf
29+ - fmt.Fprint
30+ - fmt.Fprintln
31+ - fmt.Fprintf
2732 govet :
28- enable-all : true
29- disable :
30- - fieldalignment
33+ enable-all : true
34+ disable :
35+ - fieldalignment
36+ exclusions :
37+ rules :
38+ - linters : [errcheck]
39+ source : " ^\\ s*defer "
3140
3241issues :
33- exclude-use-default : false
34- max-issues-per-linter : 0
35- max-same-issues : 0
42+ max-issues-per-linter : 0
43+ max-same-issues : 0
Original file line number Diff line number Diff line change @@ -24,7 +24,10 @@ func NewServer() (*Server, error) {
2424 return nil , err
2525 }
2626
27- localAddr := conn .LocalAddr ().(* net.UDPAddr )
27+ localAddr , ok := conn .LocalAddr ().(* net.UDPAddr )
28+ if ! ok {
29+ return nil , net .InvalidAddrError ("not a UDP address" )
30+ }
2831
2932 s := & Server {
3033 conn : conn ,
You can’t perform that action at this time.
0 commit comments