File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 44package component // import "go.opentelemetry.io/collector/component"
55
66import (
7+ "encoding"
78 "errors"
89 "fmt"
910 "regexp"
@@ -71,6 +72,12 @@ func MustNewType(strType string) Type {
7172 return ty
7273}
7374
75+ var (
76+ _ fmt.Stringer = ID {}
77+ _ encoding.TextMarshaler = ID {}
78+ _ encoding.TextUnmarshaler = (* ID )(nil )
79+ )
80+
7481// ID represents the identity for a component. It combines two values:
7582// * type - the Type of the component.
7683// * name - the name of that component.
@@ -116,7 +123,7 @@ func (id ID) Name() string {
116123
117124// MarshalText implements the encoding.TextMarshaler interface.
118125// This marshals the type and name as one string in the config.
119- func (id ID ) MarshalText () (text []byte , err error ) {
126+ func (id ID ) MarshalText () ([]byte , error ) {
120127 return []byte (id .String ()), nil
121128}
122129
You can’t perform that action at this time.
0 commit comments