package blas import ( "fmt" "dynatron.me/x/blasphem/pkg/blas/core" "dynatron.me/x/blasphem/pkg/components" ) type Setup func(core.Blas) (components.Component, error) var Registry = make(map[components.ComponentKey]Setup) func Register(key components.ComponentKey, c Setup) { _, already := Registry[key] if already { panic(fmt.Sprintf("component %s already exists", key)) } Registry[key] = c }