feat: imagorvideo init

This commit is contained in:
Adrian Shum 2022-09-08 20:44:10 +08:00
commit 2451fa1b5a
20 changed files with 2601 additions and 0 deletions

25
option.go Normal file
View file

@ -0,0 +1,25 @@
package imagorvideo
import "go.uber.org/zap"
type Option func(p *Processor)
func WithDebug(debug bool) Option {
return func(p *Processor) {
p.Debug = debug
}
}
func WithLogger(logger *zap.Logger) Option {
return func(p *Processor) {
if logger != nil {
p.Logger = logger
}
}
}
func WithFallbackImage(image string) Option {
return func(p *Processor) {
p.FallbackImage = image
}
}