func Execute(args []string, dir string) (msg *ErrMsg) {
	app := NewApp(os.Stdout)
	err := app.Init(dir)
	if err != nil {
		return senderr(err, "Internal Error", 1)
	}
	if enableLog == "yes" {
		Logger.Filename = fp.Join(config.Folder(), "logs", "dev.log")
		log.SetOutput(Logger)
	}
	defer func() {
		errmsg := senderr(app.Cleanup(), "Internal Error", 1)
		if errmsg != nil {
			msg = errmsg
		}
	}()
	cmd := app.Cmd()
	cmd.Version = version
	cmd.SetArgs(args)
	cmd.AddCommand(AllCommands(app)...)
	return senderr(cmd.Execute(), "Error", 1)
}
Execute runs the root command
package cmd
import (
	"errors"
	"fmt"
	"log"
	"os"
	fp "path/filepath"
	"github.com/harrybrwn/apizza/cmd/cli"
	"github.com/harrybrwn/apizza/cmd/commands"
	"github.com/harrybrwn/apizza/pkg/config"
	"github.com/spf13/cobra"
	"gopkg.in/natefinch/lumberjack.v2"
)
var Logger = &lumberjack.Logger{
	Filename:   "",
	MaxSize:    25,   
	MaxBackups: 10,   
	MaxAge:     365,  
	Compress:   false,
}
var (
	version string
	enableLog = "yes"
)
func AllCommands(builder cli.Builder) []*cobra.Command {
	return []*cobra.Command{
		commands.NewCartCmd(builder).Cmd(),
		commands.NewConfigCmd(builder).Cmd(),
		NewMenuCmd(builder).Cmd(),
		commands.NewOrderCmd(builder).Cmd(),
		commands.NewAddAddressCmd(builder, os.Stdin).Cmd(),
		commands.NewCompletionCmd(builder),
	}
}