wasify-go icon indicating copy to clipboard operation
wasify-go copied to clipboard

Add optional attributes [key:value] pair

Open LukaGiorgadze opened this issue 10 months ago • 0 comments

Add optional Attributes field for ModuleConfig

type ModuleConfig struct {
	...
	Attributes    map[string]string
	....
}

These attributes will be accessible within the module with the help of Module Development Kit mdk.

val := mdk.Attr("key") // val or nil
//  Or mdk.GetAttr("key") ? 

optionally, good to have built-in converters:

val := mdk.Attr("name").String()
val := mdk.Attr("age").Int()
...

LukaGiorgadze avatar Sep 02 '23 12:09 LukaGiorgadze