<commit_before>package main

import (
	"bufio"
	"encoding/csv"
	"flag"
	"fmt"
	"io"
	"log"
	"os"
)

var user = flag.String("user", "user", "jira username")
var pass = flag.String("pass", "<PASSWORD>", "jira password")
var prj = flag.String("prj", "PROJ", "jira project to add stories to")
var svr = flag.String("svr", "https://jira.example.com", "jira server url")

func main() {
	if len(os.Args) != 9 {
		flag.PrintDefaults()
		return
	}

	flag.Parse()

	// fmt.Printf("%v", os.Args)
	// fmt.Printf(*svr)

	bufrdr := bufio.NewReader(os.Stdin)
	bufrdr.ReadLine()
	bufrdr.ReadLine()
	// processIssue(csvrdr, printJSON)

	processIssue(bufrdr, submitIssue, *user, *pass, *svr, *prj)

}

type procFunc func(i []string, user string, pass string, srv string, prj string) error

func processIssue(r io.Reader, process procFunc, user string, pass string, svr string, prj string) error {

	csvrdr := csv.NewReader(r)

	for {
		record, err := csvrdr.Read()
		if err == io.EOF {
			break
		}
		if err != nil {
			log.Fatal(err)
		}

		err = process(record, user, pass, svr, prj)
		if err != nil {
			log.Fatal(err)
		}
	}

	return nil
}

func printCSV(issue []string, user string, pass string, svr string, prj string) error {
	fmt.Println(issue)
	return nil
}
func printJSON(issue []string, user string, pass string, svr string, prj string) error {
	i := newIssue(issue, prj)
	fmt.Println(string(toJSON(i)))
	return nil
}
<commit_msg>removed bad readline which was causing issues<commit_after>package main

import (
	"bufio"
	"encoding/csv"
	"flag"
	"fmt"
	"io"
	"log"
	"os"
)

var user = flag.String("user", "user", "jira username")
var pass = flag.String("pass", "<PASSWORD>", "jira password")
var prj = flag.String("prj", "PROJ", "jira project to add stories to")
var svr = flag.String("svr", "https://jira.example.com", "jira server url")

func main() {
	if len(os.Args) != 9 {
		flag.PrintDefaults()
		return
	}

	flag.Parse()

	// fmt.Printf("%v", os.Args)
	// fmt.Printf(*svr)

	bufrdr := bufio.NewReader(os.Stdin)
	bufrdr.ReadLine()
	// processIssue(csvrdr, printJSON)

	processIssue(bufrdr, submitIssue, *user, *pass, *svr, *prj)

}

type procFunc func(i []string, user string, pass string, srv string, prj string) error

func processIssue(r io.Reader, process procFunc, user string, pass string, svr string, prj string) error {

	csvrdr := csv.NewReader(r)

	for {
		record, err := csvrdr.Read()
		if err == io.EOF {
			break
		}
		if err != nil {
			log.Fatal(err)
		}

		err = process(record, user, pass, svr, prj)
		if err != nil {
			log.Fatal(err)
		}
	}

	return nil
}

func printCSV(issue []string, user string, pass string, svr string, prj string) error {
	fmt.Println(issue)
	return nil
}
func printJSON(issue []string, user string, pass string, svr string, prj string) error {
	i := newIssue(issue, prj)
	fmt.Println(string(toJSON(i)))
	return nil
}

{'fraction_non_alphanumeric': 0.1584470094438615, 'fraction_numerical': 0.0006995452955578874, 'mean_word_length': 3.9480968858131487, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '3530687', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1095, 'n_words': 301}