<commit_before>package cli

import (
	"bufio"
	"errors"
	"fmt"
	"log"
	"os"
	"regexp"
	"strings"
)

func processUserInput() (string, []string, error) {
	commStr, err := readUserInput()
	if err != nil {
		return "", nil, errors.New("error on read input: " + err.Error())
	}

	return parseCommand(commStr)
}

func readUserInput() (string, error) {
	reader := bufio.NewReader(os.Stdin)

	fmt.Print("> ")
	return reader.ReadString('\n')
}

func parseCommand(commStr string) (string, []string, error) {
	comm, args, err := parseCommandString(commStr)
	if err != nil {
		return "", nil, errors.New("error on command parsing: " + err.Error())<commit_msg>Refactor. Cli greeting is const<commit_after>package cli

import (
	"bufio"
	"errors"
	"fmt"
	"log"
	"os"
	"regexp"
	"strings"
)

const CLI_GREETING = "> "

func processUserInput() (string, []string, error) {
	commStr, err := readUserInput()
	if err != nil {
		return "", nil, errors.New("error on read input: " + err.Error())
	}

	return parseCommand(commStr)
}

func readUserInput() (string, error) {
	reader := bufio.NewReader(os.Stdin)
	fmt.Print(CLI_GREETING)
	return reader.ReadString('\n')
}

func parseCommand(commStr string) (string, []string, error) {
	comm, args, err := parseCommandString(commStr)
	if err != nil {
		return "", nil, errors.New("error on command parsing: " + err.Error())
{'fraction_non_alphanumeric': 0.1664190193164933, 'fraction_numerical': 0.0, 'mean_word_length': 4.6125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5727943', 'n_tokens_mistral': 504, 'n_tokens_neox': 490, 'n_words': 123}