Skip to content

Commit

Permalink
fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
joliveirinha committed Aug 24, 2022
1 parent 2816a49 commit ddee101
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 2 additions & 4 deletions client.go
Expand Up @@ -42,10 +42,8 @@ type client struct {
logger utils.Logger
}

var (
// make it possible to mock connection ID for initial generation in the tests
generateConnectionIDForInitial = protocol.GenerateConnectionIDForInitial
)
// make it possible to mock connection ID for initial generation in the tests
var generateConnectionIDForInitial = protocol.GenerateConnectionIDForInitial

// DialAddr establishes a new QUIC connection to a server.
// It uses a new UDP connection and closes this connection when the QUIC connection is closed.
Expand Down
6 changes: 3 additions & 3 deletions config.go
Expand Up @@ -51,12 +51,12 @@ func populateServerConfig(config *Config) *Config {
// populateClientConfig populates fields in the quic.Config with their default values, if none are set
// it may be called with nil
func populateClientConfig(config *Config, createdPacketConn bool) *Config {
var defaultConnIdLen = protocol.DefaultConnectionIDLength
defaultConnIDLen := protocol.DefaultConnectionIDLength
if createdPacketConn {
defaultConnIdLen = 0
defaultConnIDLen = 0
}

config = populateConfig(config, defaultConnIdLen)
config = populateConfig(config, defaultConnIDLen)
return config
}

Expand Down
1 change: 0 additions & 1 deletion interface.go
Expand Up @@ -206,7 +206,6 @@ type EarlyConnection interface {
//
// Connection IDs generated by an implementation should always produce IDs of constant size.
type ConnectionIDGenerator interface {

// GenerateConnectionID generates a new ConnectionID.
// Generated ConnectionIDs should be unique and observers should not be able to correlate two ConnectionIDs.
GenerateConnectionID() ([]byte, error)
Expand Down

0 comments on commit ddee101

Please sign in to comment.