1
0
mirror of https://github.com/mrusme/neonmodem.git synced 2024-06-16 06:25:23 +00:00

Extended System interface with GetConfig/SetConfig

This commit is contained in:
マリウス 2022-12-29 14:34:05 -05:00
parent 96364d8735
commit f8caeaeda9
No known key found for this signature in database
GPG Key ID: 272ED814BF63261F

View File

@ -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