From 6044bcad69adcdd0b04f5719e0409c1f9eae01fc Mon Sep 17 00:00:00 2001 From: jsvisa Date: Mon, 9 May 2016 12:02:27 +0800 Subject: [PATCH] FIX: if 'clientprofile' not configed, app.Config.Clientprofile is nil, need to make one before --- config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.go b/config.go index 07081e1..03c267a 100644 --- a/config.go +++ b/config.go @@ -176,6 +176,9 @@ func ValidateConfig(app *ApplicationContext) error { // Kafka Client Profiles // Set up a default profile, if needed + if app.Config.Clientprofile == nil { + app.Config.Clientprofile = make(map[string]*ClientProfile) + } if _, ok := app.Config.Clientprofile["default"]; !ok { app.Config.Clientprofile["default"] = &ClientProfile { ClientID: app.Config.General.ClientID,