<commit_before>package main

import (
	"errors"
	"github.com/codegangsta/cli"
	"github.com/codegangsta/gin"
	"net/url"
	"os"
	"path/filepath"
	"time"
)

var startTime = time.Now()

var helpTemplate = "usage: {{.Name}} [-v|--version] [-h|--help] [--port=<port>] <url>\n"

func main() {
	// override the app help template
	cli.AppHelpTemplate = helpTemplate

	app := cli.NewApp()
	app.Name = "gin"
	app.Usage = "A development for go web apps"
	app.Action = MainAction
	app.Flags = []cli.Flag{
		cli.IntFlag{"port", 5678, "port for the proxy server"},
	}

	app.Run(os.Args)
}

func MainAction(c *cli.Context) {
	if len(c.Args()) != 1 {
		println("Error! Not enough arguments.\n")
		cli.ShowAppHelp(c)
		os.Exit(1)
	}

  proxyToURL, err := url.Parse(c.Args()[0])
  if err != nil || len(proxyToURL.Host) == 0 {
		println("Error! Invalid URL")
		os.Exit(1)
  }
	port := c.Int("port")

	wd, err := os.Getwd()
	if err != nil {
		println(err)
		os.Exit(1)<commit_msg>Formatting<commit_after>package main

import (
	"errors"
	"github.com/codegangsta/cli"
	"github.com/codegangsta/gin"
	"net/url"
	"os"
	"path/filepath"
	"time"
)

var startTime = time.Now()

var helpTemplate = "usage: {{.Name}} [-v|--version] [-h|--help] [--port=<port>] <url>\n"

func main() {
	// override the app help template
	cli.AppHelpTemplate = helpTemplate

	app := cli.NewApp()
	app.Name = "gin"
	app.Usage = "A development for go web apps"
	app.Action = MainAction
	app.Flags = []cli.Flag{
		cli.IntFlag{"port", 5678, "port for the proxy server"},
	}

	app.Run(os.Args)
}

func MainAction(c *cli.Context) {
	if len(c.Args()) != 1 {
		println("Error! Not enough arguments.\n")
		cli.ShowAppHelp(c)
		os.Exit(1)
	}

	proxyToURL, err := url.Parse(c.Args()[0])
	if err != nil || len(proxyToURL.Host) == 0 {
		println("Error! Invalid URL")
		os.Exit(1)
	}
	port := c.Int("port")

	wd, err := os.Getwd()
	if err != nil {
		println(err)
		os.Exit(1)
{'fraction_non_alphanumeric': 0.19267015706806281, 'fraction_numerical': 0.010471204188481676, 'mean_word_length': 3.5717703349282295, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5237851', 'n_tokens_mistral': 808, 'n_tokens_neox': 770, 'n_words': 173}