From 591846068d804d6073de667b3fceed9db4f3a831 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Sat, 1 Sep 2018 06:47:13 +0000 Subject: [PATCH] fix config.go for commander/soldier add back two functions to fix the build errors Signed-off-by: Leo Chen --- client/config/config.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/client/config/config.go b/client/config/config.go index 40aa35b53..7fd24f89f 100644 --- a/client/config/config.go +++ b/client/config/config.go @@ -97,3 +97,16 @@ func (config *Config) ReadConfigFile(filename string) error { config.config = result return nil } + +func (config *Config) GetMyConfigEntry(ip string, port string) *ConfigEntry { + for _, entry := range config.config { + if entry.IP == ip && entry.Port == port { + return &entry + } + } + return nil +} + +func (config *Config) GetConfigEntries() []ConfigEntry { + return config.config +}