<commit_before>package command

import (
	"encoding/json"
	"fmt"
	"regexp"
	"sort"
	"strings"

	"github.com/bluedaniel/gotube/utils"
	"github.com/fatih/color"
	"github.com/kyokomi/emoji"
	"github.com/urfave/cli"
)

// LineStatuses contains line data
type status struct {
	StatusSeverity            int
	StatusSeverityDescription string
	Reason                    string
}

// Tube contains ftl data
type Tube struct {
	Name         string
	LineStatuses []status
}

func serviceStatus(tube Tube) int { return tube.LineStatuses[0].StatusSeverity }

func formatTubeReason(name, reason string) string {
	name = strings.Replace(name, "&", "and", -1)
	re := regexp.MustCompile("(?i)" + regexp.QuoteMeta(name) + " line:")
	return strings.Trim(re.ReplaceAllString(reason, ""), " ")
}

func pickEmoji(v int) string {
	switch v {
	case 20:
		return ":no_entry_sign:"
	case 10:<commit_msg>Move struct within it's parent<commit_after>package command

import (
	"encoding/json"
	"fmt"
	"regexp"
	"sort"
	"strings"

	"github.com/bluedaniel/gotube/utils"
	"github.com/fatih/color"
	"github.com/kyokomi/emoji"
	"github.com/urfave/cli"
)

// Tube contains ftl data
type Tube struct {
	Name         string
	LineStatuses []struct {
		StatusSeverity            int
		StatusSeverityDescription string
		Reason                    string
	}
}

func serviceStatus(tube Tube) int { return tube.LineStatuses[0].StatusSeverity }

func formatTubeReason(name, reason string) string {
	name = strings.Replace(name, "&", "and", -1)
	re := regexp.MustCompile("(?i)" + regexp.QuoteMeta(name) + " line:")
	return strings.Trim(re.ReplaceAllString(reason, ""), " ")
}

func pickEmoji(v int) string {
	switch v {
	case 20:
		return ":no_entry_sign:"
	case 10:
{'fraction_non_alphanumeric': 0.13066202090592335, 'fraction_numerical': 0.006968641114982578, 'mean_word_length': 3.7076502732240435, 'pattern_counts': {'":': 2, '<': 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': '7083727', 'n_tokens_mistral': 644, 'n_tokens_neox': 613, 'n_words': 134}