Skip to content

Commit

Permalink
Ignore/fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoPolo committed May 1, 2024
1 parent f66a578 commit 3949271
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ func (c *Conn) isHandshakeCompletedSuccessfully() bool {
return boolean.bool
}

func (c *Conn) handshake(ctx context.Context, cfg *handshakeConfig, initialFlight flightVal, initialState handshakeState) error { //nolint:gocognit
func (c *Conn) handshake(ctx context.Context, cfg *handshakeConfig, initialFlight flightVal, initialState handshakeState) error { //nolint:gocognit,contextcheck
c.fsm = newHandshakeFSM(&c.state, c.handshakeCache, cfg, initialFlight)

done := make(chan struct{})
Expand Down
9 changes: 4 additions & 5 deletions conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3187,8 +3187,8 @@ func TestApplicationDataQueueLimited(t *testing.T) {
defer cancel()

ca, cb := dpipe.Pipe()
defer ca.Close()
defer cb.Close()
defer ca.Close() //nolint:errcheck
defer cb.Close() //nolint:errcheck

done := make(chan struct{})
go func() {
Expand Down Expand Up @@ -3216,7 +3216,6 @@ func TestApplicationDataQueueLimited(t *testing.T) {
t.Log(qlen)
time.Sleep(1 * time.Second)
}

}()
if _, err := handshakeConn(ctx, dconn, cfg, false, nil); err == nil {
t.Error("expected handshake to fail")
Expand Down Expand Up @@ -3249,12 +3248,12 @@ func TestApplicationDataQueueLimited(t *testing.T) {
if err != nil {
t.Fatal(err)
}
ca.Write(packet)
ca.Write(packet) // nolint
if i%100 == 0 {
time.Sleep(10 * time.Millisecond)
}
}
time.Sleep(1 * time.Second)
ca.Close()
ca.Close() // nolint
<-done
}
3 changes: 1 addition & 2 deletions examples/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"path/filepath"
Expand Down Expand Up @@ -70,7 +69,7 @@ func LoadKeyAndCertificate(keyPath string, certificatePath string) (tls.Certific

// LoadCertificate Load/read certificate(s) from file
func LoadCertificate(path string) (*tls.Certificate, error) {
rawData, err := ioutil.ReadFile(filepath.Clean(path))
rawData, err := os.ReadFile(filepath.Clean(path))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 3949271

Please sign in to comment.