meh
This commit is contained in:
parent
69bd724000
commit
a55553b785
1 changed files with 7 additions and 1 deletions
|
@ -76,9 +76,15 @@ func (h *KeyDBHandler) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
|||
return d.ArgErr()
|
||||
}
|
||||
case "db":
|
||||
if !d.Args(strconv.Atoi(&h.DB)) {
|
||||
var dbStr string
|
||||
if !d.Args(&dbStr) {
|
||||
return d.ArgErr()
|
||||
}
|
||||
db, err := strconv.Atoi(dbStr)
|
||||
if err != nil {
|
||||
return d.Errf("invalid db number: %v", err)
|
||||
}
|
||||
h.DB = db
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue