Skip to content

Commit

Permalink
fix: add ToWriter
Browse files Browse the repository at this point in the history
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
  • Loading branch information
CarstenLeue committed Feb 20, 2024
1 parent 76ae6f2 commit 85f8071
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions file/getters.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ func ToReader[R io.Reader](r R) io.Reader {
return r
}

// ToWriter converts a [io.Writer]
func ToWriter[W io.Writer](w W) io.Writer {
return w
}

// ToCloser converts a [io.Closer]
func ToCloser[C io.Closer](c C) io.Closer {
return c
Expand Down

0 comments on commit 85f8071

Please sign in to comment.