diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-08-22 13:38:37 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-08-22 13:38:37 -0600 |
commit | af25f0254e94eb2e2898ba495bfc3de209a49e79 (patch) | |
tree | 79f20651d4fcdb27fe5c3299892576d38e82badb /cmd | |
parent | a0fd2b6c0abbd9c121ecf779058fd348327b5e0c (diff) |
caddyfile: Support global config block; allow non-empty blocks w/ 0 keys
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/commands.go | 2 | ||||
-rw-r--r-- | cmd/main.go | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/cmd/commands.go b/cmd/commands.go index 99ec642..bb5429c 100644 --- a/cmd/commands.go +++ b/cmd/commands.go @@ -331,7 +331,7 @@ func cmdAdaptConfig() (int, error) { fmt.Errorf("reading input file: %v", err) } - opts := make(map[string]string) + opts := make(map[string]interface{}) if *adaptCmdPrettyFlag { opts["pretty"] = "true" } diff --git a/cmd/main.go b/cmd/main.go index e0a3686..e2f1233 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -131,9 +131,8 @@ func loadConfig(configFile, adapterName string) ([]byte, error) { // adapt config if cfgAdapter != nil { - adaptedConfig, warnings, err := cfgAdapter.Adapt(config, map[string]string{ + adaptedConfig, warnings, err := cfgAdapter.Adapt(config, map[string]interface{}{ "filename": configFile, - // TODO: all other options... (http-port, etc...) }) if err != nil { return nil, fmt.Errorf("adapting config using %s: %v", adapterName, err) |