<commit_before>package main

import (
	"cf/commands"
	"github.com/codegangsta/cli"
	"os"
	"cf/terminal"
)

func main() {
	app := cli.NewApp()
	app.Name = "cf"
	app.Usage = "A command line tool to interact with Cloud Foundry"
	app.Version = "1.0.0.alpha"
	app.Commands = []cli.Command{
		{
			Name:      "target",
			ShortName: "t",
			Usage:     "Set or view the target",
			Action: func(c *cli.Context) {
				commands.Target(c, new(terminal.TerminalUI))
			},
		},
		{
			Name:      "login",
			ShortName: "l",
			Usage:     "Log user in",
			Action: func(c *cli.Context) {
				commands.Login(c, new(terminal.TerminalUI))
			},
		},
	}
	app.Run(os.Args)
}<commit_msg>Instantiate TerminalUI only once<commit_after>package main

import (
	"cf/commands"
	"github.com/codegangsta/cli"
	"os"
	"cf/terminal"
)

func main() {
	terminalUI := new(terminal.TerminalUI)

	app := cli.NewApp()
	app.Name = "cf"
	app.Usage = "A command line tool to interact with Cloud Foundry"
	app.Version = "1.0.0.alpha"
	app.Commands = []cli.Command{
		{
			Name:      "target",
			ShortName: "t",
			Usage:     "Set or view the target",
			Action: func(c *cli.Context) {
				commands.Target(c, terminalUI)
			},
		},
		{
			Name:      "login",
			ShortName: "l",
			Usage:     "Log user in",
			Action: func(c *cli.Context) {
				commands.Login(c, terminalUI)
			},
		},
	}
	app.Run(os.Args)
}
{'fraction_non_alphanumeric': 0.16447368421052633, 'fraction_numerical': 0.0043859649122807015, 'mean_word_length': 2.8892045454545454, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1403475', 'n_tokens_mistral': 602, 'n_tokens_neox': 534, 'n_words': 117}