some refinement
This commit is contained in:
17
common/elements/v1/core/config.go
Normal file
17
common/elements/v1/core/config.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package core
|
||||
|
||||
import "git.vezzani.net/ben/games/common/elements/v1"
|
||||
|
||||
type OptFunc func(*Element)
|
||||
|
||||
func Children(children ...elements.Element) OptFunc {
|
||||
return func(c *Element) {
|
||||
c.children = children
|
||||
}
|
||||
}
|
||||
|
||||
func Name(name string) OptFunc {
|
||||
return func(s *Element) {
|
||||
s.name = name
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user