proper
This commit is contained in:
13
cmd/cmd.go
13
cmd/cmd.go
@ -240,6 +240,11 @@ var globalFlags = []cli.Flag{
|
||||
Value: "",
|
||||
EnvVar: "CLAMAV_HOST",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "perform-clamav-prescan",
|
||||
Usage: "perform-clamav-prescan",
|
||||
EnvVar: "PERFORM_CLAMAV_PRESCAN",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "virustotal-key",
|
||||
Usage: "virustotal-key",
|
||||
@ -388,6 +393,14 @@ func New() *Cmd {
|
||||
options = append(options, server.ClamavHost(v))
|
||||
}
|
||||
|
||||
if v := c.Bool("perform-clamav-prescan"); v != false {
|
||||
if c.String("clamav-host") == "" {
|
||||
panic("clamav-host not set")
|
||||
}
|
||||
|
||||
options = append(options, server.PerformClamavPrescan(v))
|
||||
}
|
||||
|
||||
if v := c.Int64("max-upload-size"); v > 0 {
|
||||
options = append(options, server.MaxUploadSize(v))
|
||||
}
|
||||
|
Reference in New Issue
Block a user