mirror of
https://github.com/labstack/echo.git
synced 2025-01-12 01:22:21 +02:00
7c9a0b6489
Signed-off-by: Vishal Rana <vr@labstack.com>
21 lines
305 B
Go
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}
|
|
}
|