19 lines
243 B
Go
19 lines
243 B
Go
package images
|
|
|
|
import "os"
|
|
|
|
type Service struct {
|
|
fs fileSystem
|
|
}
|
|
|
|
func New(fs fileSystem) *Service {
|
|
return &Service{
|
|
fs: fs,
|
|
}
|
|
}
|
|
|
|
type fileSystem interface {
|
|
Read(path string) ([]byte, error)
|
|
Stat(path string) (os.FileInfo, error)
|
|
}
|