From 3932ca8971239e08833a8d8f6f71b474433d1f81 Mon Sep 17 00:00:00 2001 From: Ye Yin Date: Wed, 12 Oct 2016 12:26:25 +0800 Subject: [PATCH] Fix configure file parse --- cmd/chihaya/config.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/chihaya/config.go b/cmd/chihaya/config.go index 5c7c896..d3eac42 100644 --- a/cmd/chihaya/config.go +++ b/cmd/chihaya/config.go @@ -23,13 +23,13 @@ type hookConfig struct { // ConfigFile represents a namespaced YAML configation file. type ConfigFile struct { MainConfigBlock struct { - middleware.Config - PrometheusAddr string `yaml:"prometheus_addr"` - HTTPConfig httpfrontend.Config `yaml:"http"` - UDPConfig udpfrontend.Config `yaml:"udp"` - Storage memory.Config `yaml:"storage"` - PreHooks []hookConfig `yaml:"prehooks"` - PostHooks []hookConfig `yaml:"posthooks"` + middleware.Config `yaml:",inline"` + PrometheusAddr string `yaml:"prometheus_addr"` + HTTPConfig httpfrontend.Config `yaml:"http"` + UDPConfig udpfrontend.Config `yaml:"udp"` + Storage memory.Config `yaml:"storage"` + PreHooks []hookConfig `yaml:"prehooks"` + PostHooks []hookConfig `yaml:"posthooks"` } `yaml:"chihaya"` }