imagorvideoextended/option.go
Failure f348bb92e3
Some checks are pending
docker / Docker (push) Waiting to run
test / Test (push) Waiting to run
remove video specific stuff, base off of video, and add support for HTML
2024-07-30 02:34:01 -07:00

29 lines
559 B
Go

package imagorvideoextended
import "go.uber.org/zap"
// Option imagorvideo option
type Option func(p *Processor)
// WithDebug with debug option
func WithDebug(debug bool) Option {
return func(p *Processor) {
p.Debug = debug
}
}
// WithLogger with logger option
func WithLogger(logger *zap.Logger) Option {
return func(p *Processor) {
if logger != nil {
p.Logger = logger
}
}
}
// WithFallbackImage with fallback imagor option on error
func WithFallbackImage(image string) Option {
return func(p *Processor) {
p.FallbackImage = image
}
}