mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
update config with get, gettoggle methods
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user