浏览代码

enables structcheck and others

Diego Alvarez 5 年之前
父节点
当前提交
6709a950d8
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 3 3
      .golangci.yml
  2. 1 1
      mockbroker.go

+ 3 - 3
.golangci.yml

@@ -49,16 +49,16 @@ linters:
     - gofmt
     - goimports
     # - golint
-    # - gosec
+    - gosec
     # - gosimple
     - govet
     # - ineffassign
-    # - interfacer
+    - interfacer
     # - misspell
     # - nakedret
     # - scopelint
     # - staticcheck
-    # - structcheck
+    - structcheck
     # - stylecheck
     - typecheck
     # - unconvert

+ 1 - 1
mockbroker.go

@@ -213,7 +213,7 @@ func (b *MockBroker) isGSSAPI(buffer []byte) bool {
 	return buffer[4] == 0x60 || bytes.Equal(buffer[4:6], []byte{0x05, 0x04})
 }
 
-func (b *MockBroker) handleRequests(conn net.Conn, idx int, wg *sync.WaitGroup) {
+func (b *MockBroker) handleRequests(conn io.ReadWriteCloser, idx int, wg *sync.WaitGroup) {
 	defer wg.Done()
 	defer func() {
 		_ = conn.Close()