Skip to content

Commit

Permalink
no need to initialised with one more variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket-0510 committed Apr 26, 2024
1 parent cbeb933 commit 89d1c0d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions config/confighttp/confighttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,11 @@ type ClientConfig struct {
func NewDefaultClientConfig() ClientConfig {
// The default values are taken from the values of 'DefaultTransport' of 'http' package.

// Configure with the non-nil map value.
headers := make(map[string]configopaque.String)

maxIdleConns := 100
idleConnTimeout := 90 * time.Second

return ClientConfig{
Headers: headers,
Headers: make(map[string]configopaque.String),
MaxIdleConns: &maxIdleConns,
IdleConnTimeout: &idleConnTimeout,
}
Expand Down Expand Up @@ -293,11 +290,9 @@ type ServerConfig struct {

// NewDefaultServerConfig creates new ServerConfig with default values set
func NewDefaultServerConfig() ServerConfig {
// Create a new map for ResponseHeaders
responseHeaders := make(map[string]configopaque.String)

return ServerConfig{
ResponseHeaders: responseHeaders,
ResponseHeaders: make(map[string]configopaque.String),
}
}

Expand Down

0 comments on commit 89d1c0d

Please sign in to comment.