imagorvideoextended/config.go
Failure 17d4d46d09
Some checks failed
docker / Docker (push) Has been cancelled
test / Test (push) Has been cancelled
youtube handling + special site handling framework
2024-08-06 08:50:35 -07:00

24 lines
479 B
Go

package imagorvideoextended
import (
"flag"
"github.com/cshum/imagor"
"go.uber.org/zap"
)
func LoaderConfig(fs *flag.FlagSet, cb func() (*zap.Logger, bool)) imagor.Option {
return imagor.WithLoaders(NewSpecialLoader())
}
// Config imagorvideo config.Option
func Config(fs *flag.FlagSet, cb func() (*zap.Logger, bool)) imagor.Option {
var (
logger, isDebug = cb()
)
return imagor.WithProcessors(
NewProcessor(
WithLogger(logger),
WithDebug(isDebug),
),
)
}