Skip to content

Commit

Permalink
Update LoadReceiver signature to remove unused params (#2823)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu authored Mar 29, 2021
1 parent 859a4b4 commit 38e5761
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Move `config.Load` to use `configparser.Load` (#2796)
- Remove `configtest.NewViperFromYamlFile()`, use `config.Parser.NewParserFromFile()` (#2806)
- Move `config.ViperSubExact()` to use `config.Parser.Sub()` (#2806)
- Update LoadReceiver signature to remove unused params (#2823)

## 💡 Enhancements 💡

Expand Down
4 changes: 2 additions & 2 deletions config/configparser/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func loadService(rawService serviceSettings) (config.Service, error) {
}

// LoadReceiver loads a receiver config from componentConfig using the provided factories.
func LoadReceiver(componentConfig *config.Parser, typeStr config.Type, fullName string, factory component.ReceiverFactory) (config.Receiver, error) {
func LoadReceiver(componentConfig *config.Parser, fullName string, factory component.ReceiverFactory) (config.Receiver, error) {
// Create the default config for this receiver.
receiverCfg := factory.CreateDefaultConfig()
receiverCfg.SetName(fullName)
Expand Down Expand Up @@ -310,7 +310,7 @@ func loadReceivers(recvs map[string]interface{}, factories map[config.Type]compo
return nil, errorUnknownType(receiversKeyName, typeStr, fullName)
}

receiverCfg, err := LoadReceiver(componentConfig, typeStr, fullName, factory)
receiverCfg, err := LoadReceiver(componentConfig, fullName, factory)

if err != nil {
// LoadReceiver already wraps the error.
Expand Down

0 comments on commit 38e5761

Please sign in to comment.