sampler-fork/asset/file.go

23 lines
306 B
Go
Raw Permalink Normal View History

package asset
import (
"bytes"
"io"
)
type AssetFile struct {
reader io.Reader
}
func NewAssetFile(data []byte) AssetFile {
return AssetFile{bytes.NewReader(data)}
}
2019-02-24 06:14:12 +00:00
func (a AssetFile) Read(p []byte) (n int, err error) {
return a.reader.Read(p)
}
2019-02-24 06:14:12 +00:00
func (a AssetFile) Close() error {
return nil
}