some refinement
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
package stacks
|
||||
|
||||
import "git.vezzani.net/ben/games/common/elements/v1"
|
||||
import (
|
||||
"git.vezzani.net/ben/games/common/elements/v1/core"
|
||||
)
|
||||
|
||||
type OptFunc func(*Stack)
|
||||
|
||||
func Core(f elements.OptFunc) OptFunc {
|
||||
func Core(fs ...core.OptFunc) OptFunc {
|
||||
return func(s *Stack) {
|
||||
f(&s.Core)
|
||||
for _, f := range fs {
|
||||
f(&s.Element)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user