From 836d5af9e465beba771c148eba81303af65f9481 Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Mon, 8 Oct 2018 15:33:01 -0600 Subject: [PATCH] Add Port and MonitorPort to config --- config/config.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/config/config.go b/config/config.go index eb65772..5e01198 100644 --- a/config/config.go +++ b/config/config.go @@ -7,17 +7,25 @@ import ( ) const cdbpath = "DBPath" +const port = "port" +const mport = "mport" type Config struct { - DBPath string + DBPath string + Port string + MonitorPort string } func New() *Config { lookups := make(map[string]*string) add(cdbpath, "./db", lookups) + add(port, "9101", lookups) + add(mport, "9102", lookups) flag.Parse() return &Config{ - DBPath: *lookups[cdbpath], + DBPath: *lookups[cdbpath], + Port: *lookups[port], + MonitorPort: *lookups[mport], } }