mirror of
https://github.com/anchore/syft
synced 2024-11-10 06:14:16 +00:00
c892c3609e
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
16 lines
265 B
Go
16 lines
265 B
Go
package file
|
|
|
|
import (
|
|
"io"
|
|
"os"
|
|
)
|
|
|
|
// Opener is an object that stores a path to later be opened as a file.
|
|
type Opener struct {
|
|
path string
|
|
}
|
|
|
|
// Open the stored path as a io.ReadCloser.
|
|
func (o Opener) Open() (io.ReadCloser, error) {
|
|
return os.Open(o.path)
|
|
}
|