mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 18:15:42 +01:00
Make defaultLockFile a constant
This commit is contained in:
parent
39787503cc
commit
c3a80b9f52
1 changed files with 6 additions and 9 deletions
|
|
@ -32,10 +32,7 @@ const (
|
|||
defaultWeb = "/var/www/html"
|
||||
defaultDomain = "https://example.com"
|
||||
defaultUpdateInterval = "on best effort"
|
||||
)
|
||||
|
||||
var (
|
||||
defaultLockFile = "/var/csaf_aggregator/run.lock"
|
||||
defaultLockFile = "/var/csaf_aggregator/run.lock"
|
||||
)
|
||||
|
||||
type provider struct {
|
||||
|
|
@ -266,11 +263,11 @@ func (c *config) setDefaults() {
|
|||
c.Domain = defaultDomain
|
||||
}
|
||||
|
||||
if c.LockFile == nil {
|
||||
c.LockFile = &defaultLockFile
|
||||
}
|
||||
|
||||
if *c.LockFile == "" {
|
||||
switch {
|
||||
case c.LockFile == nil:
|
||||
lockFile := defaultLockFile
|
||||
c.LockFile = &lockFile
|
||||
case *c.LockFile == "":
|
||||
c.LockFile = nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue