Documentation ¶
Index ¶
- Variables
- func AlreadyUpsized(originalImage path.Entry, outputPath string) bool
- func MakeDir(path string) error
- func WatchDir(ctx context.Context, inputDir, outputDir string, images chan path.Entry) error
- func WatchEventChanToEntryChan(watchEvents chan path.WatchEvent) chan path.Entry
- func WatchEventToEntry(watchEvents []path.WatchEvent) []path.Entry
Constants ¶
This section is empty.
Variables ¶
View Source
var ImageExtensionRegex = regexp.MustCompile(".*.jpg$|.*.jpeg$|.*.png$|.*.webp$|.*.JPG$|.*.JPEG$|.*.PNG$|.*.WEBP$")
ImageExtensionRegex are all the supported image extensions, and the only ones that will be included in file search/globbing.
Functions ¶
func AlreadyUpsized ¶
AlreadyUpsized checks if we already upsized the image.
func WatchDir ¶
WatchDir will watch the given dir for new files and will publish the ones not already upsized to the given images chan.
func WatchEventChanToEntryChan ¶
func WatchEventChanToEntryChan(watchEvents chan path.WatchEvent) chan path.Entry
WatchEventToEntry convert path.WatchEvent to path.Entry
func WatchEventToEntry ¶
func WatchEventToEntry(watchEvents []path.WatchEvent) []path.Entry
WatchEventToEntry convert path.WatchEvent to path.Entry
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.