File tree Expand file tree Collapse file tree 2 files changed +4
-16
lines changed
Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change 99
1010run-testsuite-server :
1111 go run github.com/lxzan/gws/examples/testsuite
12+
13+ coverage :
14+ go test -v $(go list ./... |grep -v /cmd |grep -v /vendor ) -coverprofile=bin/coverage.out
15+
Original file line number Diff line number Diff line change @@ -87,22 +87,6 @@ func (c StatusCode) Error() string {
8787 return "gws: " + closeErrorMap [c ]
8888}
8989
90- func (c StatusCode ) ToClientCode () StatusCode {
91- if ! (c == 1000 || (c >= 3000 && c < 5000 )) {
92- if c < 1000 || (c >= 1016 && c < 3000 ) {
93- return CloseProtocolError
94- } else {
95- switch c {
96- case 1004 , 1005 , 1006 , 1014 :
97- return CloseProtocolError
98- default :
99- return 1000
100- }
101- }
102- }
103- return c
104- }
105-
10690func NewError (code StatusCode , err error ) * Error {
10791 return & Error {Code : code , Err : err }
10892}
You can’t perform that action at this time.
0 commit comments