feat: imagorvideo init
This commit is contained in:
commit
2451fa1b5a
20 changed files with 2601 additions and 0 deletions
25
option.go
Normal file
25
option.go
Normal 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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue