-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathconfig.go
More file actions
24 lines (21 loc) · 546 Bytes
/
Copy pathconfig.go
File metadata and controls
24 lines (21 loc) · 546 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package imagorvideo
import (
"flag"
"github.com/cshum/imagor"
"go.uber.org/zap"
)
// Config imagorvideo config.Option
func Config(fs *flag.FlagSet, cb func() (*zap.Logger, bool)) imagor.Option {
var (
ffmpegFallbackImage = fs.String("ffmpeg-fallback-image", "",
"FFmpeg fallback image on processing error. Supports image path enabled by loaders or storages")
logger, isDebug = cb()
)
return imagor.WithProcessors(
NewProcessor(
WithFallbackImage(*ffmpegFallbackImage),
WithLogger(logger),
WithDebug(isDebug),
),
)
}