Pinball dot-matrix clock animation thingy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
372 B

package driver
import "fmt"
type Factory func(*Config) (Matrix, error)
var registry = map[string]Factory{}
func Load(name string, config *Config) (Matrix, error) {
if factory, ok := registry[name]; ok {
return factory(config)
return nil, fmt.Errorf("driver: unknown driver %q", name)
func Register(name string, factory Factory) {
registry[name] = factory