filetarget.go 243 B

1234567891011121314151617181920
  1. package target
  2. import (
  3. "io"
  4. "os"
  5. )
  6. type FileTarget struct {
  7. path string
  8. }
  9. func NewFileTarget(path string) *FileTarget {
  10. return &FileTarget{
  11. path: path,
  12. }
  13. }
  14. func (t *FileTarget) Load() (io.Reader, error) {
  15. return os.Open(t.path)
  16. }