cleaning up the component system just a bit more...
This commit is contained in:
15
common/elements/v1/config.go
Normal file
15
common/elements/v1/config.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package elements
|
||||
|
||||
type OptFunc func(*Core)
|
||||
|
||||
func Children(children ...Element) OptFunc {
|
||||
return func(c *Core) {
|
||||
c.children = children
|
||||
}
|
||||
}
|
||||
|
||||
func Name(name string) OptFunc {
|
||||
return func(s *Core) {
|
||||
s.name = name
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user