update config with get, gettoggle methods

This commit is contained in:
Bradley Cicenas
2017-02-12 06:03:10 +00:00
parent d5d91398f5
commit d56af1d932
6 changed files with 51 additions and 30 deletions

View File

@@ -14,7 +14,7 @@ import (
func NewContainerMap() *ContainerMap {
// init docker client
client, err := docker.NewClient(config.Global["dockerHost"])
client, err := docker.NewClient(config.Get("dockerHost"))
if err != nil {
panic(err)
}
@@ -100,7 +100,7 @@ func (cm *ContainerMap) Del(ids ...string) {
func (cm *ContainerMap) All() []*Container {
var containers Containers
filter := config.Global["filterStr"]
filter := config.Get("filterStr")
re := regexp.MustCompile(fmt.Sprintf(".*%s", filter))
for _, c := range cm.containers {