func registerProvisionersCommands(m *cmd.Manager) { provisioners := provision.Registry() for _, p := range provisioners { if c, ok := p.(cmd.Commandable); ok { commands := c.Commands() for _, cmd := range commands { m.Register(&tsurudCommand{Command: cmd}) } } } }
func registerProvisionersCommands(m *cmd.Manager) { provisioners := provision.Registry() for _, p := range provisioners { if c, ok := p.(cmd.AdminCommandable); ok { commands := c.AdminCommands() for _, cmd := range commands { m.Register(cmd) } } } }
func registerProvisionersCommands(m *cmd.Manager) error { provisioners, err := provision.Registry() if err != nil { return err } for _, p := range provisioners { if c, ok := p.(cmd.Commandable); ok { commands := c.Commands() for _, cmd := range commands { m.Register(&tsurudCommand{Command: cmd}) } } } return nil }