Skip to content

Commit

Permalink
Fix golangci-lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dorion committed Aug 18, 2022
1 parent fc71671 commit 2e37379
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions api/lang/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func logInfo(req *jsonrpc2.Request, msg string, args ...interface{}) {
logToLsp(lsp.Info, m)
}

//nolint:all TODO: remove if this function will use
func logWarning(req *jsonrpc2.Request, msg string, args ...interface{}) {
m := fmt.Sprintf(getLogFormatFor(req, msg), args...)
logger.Warningf(false, m)
Expand Down
7 changes: 3 additions & 4 deletions conn/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ func (m mockConn) Read(b []byte) (n int, err error) {
}

data := append(proto.EncodeVarint(uint64(len(messageBytes))), messageBytes...)
for i := 0; i < len(data); i++ {
b[i] = data[i]
}
return len(data), nil
length := copy(b, data)

return length, nil
}

func (m mockConn) Write(b []byte) (n int, err error) {
Expand Down

0 comments on commit 2e37379

Please sign in to comment.