small refactor

This commit is contained in:
yusing
2025-02-20 17:45:03 +08:00
parent 3ce3520c45
commit c66b17583f
2 changed files with 5 additions and 1 deletions

View File

@@ -223,3 +223,7 @@ func CopyClose(dst *ContextWriter, src *ContextReader) (err error) {
}
}
}
func CopyCloseWithContext(ctx context.Context, dst io.Writer, src io.Reader) (err error) {
return CopyClose(NewContextWriter(ctx, dst), NewContextReader(ctx, src))
}