mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
refactor enabled connectors
This commit is contained in:
@@ -7,7 +7,10 @@ import (
|
||||
"github.com/bcicen/ctop/logging"
|
||||
)
|
||||
|
||||
var log = logging.Init()
|
||||
var (
|
||||
log = logging.Init()
|
||||
enabled = make(map[string]func() Connector)
|
||||
)
|
||||
|
||||
func ByName(s string) (Connector, error) {
|
||||
if _, ok := enabled[s]; !ok {
|
||||
|
||||
Reference in New Issue
Block a user