diff --git a/pkg/hamdeck/hamdeck_test.go b/pkg/hamdeck/hamdeck_test.go index 92811d1..1b546ca 100644 --- a/pkg/hamdeck/hamdeck_test.go +++ b/pkg/hamdeck/hamdeck_test.go @@ -100,16 +100,7 @@ func openTestConfigFile(filename string) (io.ReadCloser, error) { } func openTestConfigString(config string) (io.ReadCloser, error) { - buffer := bytes.NewBufferString(config) - return &readCloseWrapper{buffer}, nil -} - -type readCloseWrapper struct { - io.Reader -} - -func (w *readCloseWrapper) Close() error { - return nil + return io.NopCloser(bytes.NewBufferString(config)), nil } type testDevice struct {