// Run calls out to the pkg lib to create the class and displays the output
Run calls out to the pkg lib to create the class and displays the output
// Run calls out to the pkg lib to create the class and displays the output
func (c *CreateCmd) Run() error {
	class, err := c.App.RetrieveClassByName(c.From)
	if err != nil {
		return err
	}
	class.Name = c.Name
	createdClass, err := c.App.CreateClass(class)
	if err != nil {
		return err
	}
	output.WriteClassDetails(c.Output, createdClass)
	return nil
}
func ( c * CreateCmd ) Run ( ) error { class , err := c . App . RetrieveClassByName ( c . From ) if err != nil { return err } class . Name = c . Name createdClass , err := c . App . CreateClass ( class ) if err != nil { return err } output . WriteClassDetails ( c . Output , createdClass ) return nil }
Run calls out to the pkg lib to create the class and displays the output
Run calls out to the pkg lib to create the class and displays the output