Skip to content

Commit

Permalink
Rename CustomUnmarshable to Unmarshallable, typo in the initial name
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu committed Aug 5, 2021
1 parent cebe577 commit 0f86ba6
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ type validatable interface {
Validate() error
}

// CustomUnmarshable defines an optional interface for custom configuration unmarshaling.
// Unmarshallable defines an optional interface for custom configuration unmarshaling.
// A configuration struct can implement this interface to override the default unmarshaling.
type CustomUnmarshable interface {
type Unmarshallable interface {
// Unmarshal is a function that un-marshals a Parser into the unmarshable struct in a custom way.
// componentSection *Parser
// The config for this specific component. May be nil or empty if no config available.
Expand Down
2 changes: 1 addition & 1 deletion config/configloader/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ func expandEnv(s string) string {
}

func unmarshal(componentSection *configparser.Parser, intoCfg interface{}) error {
if cu, ok := intoCfg.(config.CustomUnmarshable); ok {
if cu, ok := intoCfg.(config.Unmarshallable); ok {
return cu.Unmarshal(componentSection)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/testcomponents/example_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"go.opentelemetry.io/collector/model/pdata"
)

var _ config.CustomUnmarshable = (*ExampleExporter)(nil)
var _ config.Unmarshallable = (*ExampleExporter)(nil)

// ExampleExporter is for testing purposes. We are defining an example config and factory
// for "exampleexporter" exporter type.
Expand Down
2 changes: 1 addition & 1 deletion receiver/hostmetricsreceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type Config struct {
}

var _ config.Receiver = (*Config)(nil)
var _ config.CustomUnmarshable = (*Config)(nil)
var _ config.Unmarshallable = (*Config)(nil)

// Validate checks the receiver configuration is valid
func (cfg *Config) Validate() error {
Expand Down
2 changes: 1 addition & 1 deletion receiver/jaegerreceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ type Config struct {
}

var _ config.Receiver = (*Config)(nil)
var _ config.CustomUnmarshable = (*Config)(nil)
var _ config.Unmarshallable = (*Config)(nil)

// Validate checks the receiver configuration is valid
func (cfg *Config) Validate() error {
Expand Down
2 changes: 1 addition & 1 deletion receiver/otlpreceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type Config struct {
}

var _ config.Receiver = (*Config)(nil)
var _ config.CustomUnmarshable = (*Config)(nil)
var _ config.Unmarshallable = (*Config)(nil)

// Validate checks the receiver configuration is valid
func (cfg *Config) Validate() error {
Expand Down
2 changes: 1 addition & 1 deletion receiver/prometheusreceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type Config struct {
}

var _ config.Receiver = (*Config)(nil)
var _ config.CustomUnmarshable = (*Config)(nil)
var _ config.Unmarshallable = (*Config)(nil)

// Validate checks the receiver configuration is valid.
func (cfg *Config) Validate() error {
Expand Down

0 comments on commit 0f86ba6

Please sign in to comment.