Skip to content

Commit d299e9b

Browse files
committed
fix linting issue, interface{} -> any
1 parent ada7825 commit d299e9b

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

component/componenttest/configtest_test.go

+3-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package componenttest
55

66
import (
7-
"errors"
87
"io"
98
"strings"
109
"testing"
@@ -13,15 +12,10 @@ import (
1312
"github.com/stretchr/testify/require"
1413
)
1514

16-
type FailMarshalYaml string
17-
1815
type TestID string
1916

2017
func (tID *TestID) UnmarshalText(text []byte) error {
2118
*tID = TestID(strings.TrimSuffix(string(text), "_"))
22-
if *tID == "error" {
23-
return errors.New("parsing error")
24-
}
2519
return nil
2620
}
2721

@@ -33,7 +27,9 @@ func (tID TestID) MarshalText() (text []byte, err error) {
3327
return []byte(out), nil
3428
}
3529

36-
func (FailMarshalYaml) MarshalYAML() (interface{}, error) {
30+
type FailMarshalYaml string
31+
32+
func (FailMarshalYaml) MarshalYAML() (any, error) {
3733
return nil, assert.AnError
3834
}
3935

0 commit comments

Comments
 (0)