Skip to content

Commit

Permalink
Make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
applejag committed Jun 6, 2024
1 parent 3caa187 commit 29210e7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ type ConfigHeaders struct {
// CreateConfig creates the default plugin configuration.
func CreateConfig() *Config {
return &Config{
Headers: ConfigHeaders{},
Headers: ConfigHeaders{
Port: "",
IP: "",
Address: "",
},
}
}

Expand All @@ -38,7 +42,7 @@ type RemoteAddrPlugin struct {

// New created a new RemoteAddrPlugin.
func New(_ context.Context, next http.Handler, config *Config, name string) (http.Handler, error) {
if config.Headers == (ConfigHeaders{}) {
if config.Headers == (ConfigHeaders{Port: "", IP: "", Address: ""}) {
return nil, errMissingHeaderConfig
}

Expand Down

0 comments on commit 29210e7

Please sign in to comment.