From f8caeaeda9e2e56f7f121338c6bb32f596e1ad7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9E=E3=83=AA=E3=82=A6=E3=82=B9?= Date: Thu, 29 Dec 2022 14:34:05 -0500 Subject: [PATCH] Extended System interface with GetConfig/SetConfig --- system/system.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system/system.go b/system/system.go index 9b4b147..e8a49e1 100644 --- a/system/system.go +++ b/system/system.go @@ -10,6 +10,8 @@ import ( ) type System interface { + GetConfig() map[string]interface{} + SetConfig(cfg *map[string]interface{}) GetCapabilities() []adapter.Capability Load() error @@ -29,6 +31,7 @@ func New(sysType string, sysConfig *map[string]interface{}) (System, error) { return nil, errors.New("No such system") } + sys.SetConfig(sysConfig) err := sys.Load() if err != nil { return nil, err