1
0
mirror of https://github.com/labstack/echo.git synced 2025-01-12 01:22:21 +02:00
echo/utils.go
Vishal Rana 7c9a0b6489 initial commit
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-03-01 09:45:13 -08:00

21 lines
305 B
Go

package bolt
import (
"bytes"
"io"
)
type nopCloser struct {
*bytes.Buffer
}
func (nopCloser) Close() error {
return nil
}
// NopCloser returns a ReadWriteCloser with a no-op Close method wrapping
// the provided Buffer.
func NopCloser(b *bytes.Buffer) io.ReadWriteCloser {
return nopCloser{b}
}