Skip to content

Commit aed7bbd

Browse files
committed
generic: add io.Closer function wrapper
1 parent f66859c commit aed7bbd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

internal/generic/closer.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package generic
2+
3+
// Closer wraps a close function
4+
// to satisfy [io.Closer].
5+
type Closer func() error
6+
7+
func (close Closer) Close() error { return close() }

0 commit comments

Comments
 (0)