aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddyconfig/httpcaddyfile/options.go
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2020-05-01 09:34:32 -0600
committerMatthew Holt <[email protected]>2020-05-01 09:34:32 -0600
commitbca610fbde82c4b45526dd526d7ddfa6e3bdac70 (patch)
treee48afd329e3661966533ddf8d3c141a9d1d38f64 /caddyconfig/httpcaddyfile/options.go
parent1fa8c185a893381c06960142d35a557787f61bdc (diff)
downloadcaddy-bca610fbde82c4b45526dd526d7ddfa6e3bdac70.tar.gz
caddy-bca610fbde82c4b45526dd526d7ddfa6e3bdac70.zip
httpcaddyfile: Minor fixes to parsing storage options
Diffstat (limited to 'caddyconfig/httpcaddyfile/options.go')
-rw-r--r--caddyconfig/httpcaddyfile/options.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/caddyconfig/httpcaddyfile/options.go b/caddyconfig/httpcaddyfile/options.go
index 072d8f49d..2ab73b24c 100644
--- a/caddyconfig/httpcaddyfile/options.go
+++ b/caddyconfig/httpcaddyfile/options.go
@@ -136,14 +136,13 @@ func parseOptOrder(d *caddyfile.Dispenser) ([]string, error) {
}
func parseOptStorage(d *caddyfile.Dispenser) (caddy.StorageConverter, error) {
- if !d.Next() {
+ if !d.Next() { // consume option name
return nil, d.ArgErr()
}
- args := d.RemainingArgs()
- if len(args) != 1 {
+ if !d.Next() { // get storage module name
return nil, d.ArgErr()
}
- modName := args[0]
+ modName := d.Val()
mod, err := caddy.GetModule("caddy.storage." + modName)
if err != nil {
return nil, d.Errf("getting storage module '%s': %v", modName, err)