// Copyright 2024 Matthew Rich . All rights reserved. package ext import ( "io" ) // Restrict the underlying io.Reader to only exposed the io.Reader interface. // Removes the io.WriterTo interface. func NewReadCloser(r io.ReadCloser) io.ReadCloser { return basicReadCloser{r} } type basicReadCloser struct { io.ReadCloser } func NewReader(r io.Reader) io.Reader { return basicReader{r} } type basicReader struct { io.Reader }