<commit_before>package slack

type URL string
type Colour string

const (
	Good    = "good"
	Warning = "warning"
	Danger  = "danger"
)

type Message struct {
	UserName    string        `json:"username,omitempty"`
	UserIcon    URL           `json:"icon_url,omitempty"`
	UserEmoji   string        `json:"icon_emoji,omitempty"`
	Channel     string        `json:"channel,omitempty"`
	Attachments []*Attachment `json:"attachments,omitempty"`
	Text        string        `json:"text,omitempty"`
}

type Attachment struct {
	Title     string   `json:"title,omitempty"`
	TitleLink string   `json:"title_link,omitempty"`
	ImageURL  string   `json:"image_url,omitempty"`
	ThumbURL  string   `json:"thumb_url,omitempty"`
	Fallback  string   `json:"fallback"`
	Text      string   `json:"text,omitempty"`
	PreText   string   `json:"pretext,omitempty"`
	Colour    Colour   `json:"color,omitempty"` //// Can either be one of 'good', 'warning', 'danger', or any hex color code
	Fields    []*Field `json:"fields,omitempty"`
}

type Field struct {
	Title string `json:"title"`           // The title may not contain markup and will be escaped for you
	Value string `json:"value"`           // Text value of the field. May contain standard message markup and must be escaped as normal.  May be multi-line
	Short bool   `json:"short,omitempty"` // Optional flag indicating whether the `value` is short enough to be displayed side-by-side with other values
}

type FieldList []*Field

func (f FieldList) Swap(i, j int) { f[i], f[j] = f[j], f[i] }
func (f FieldList) Len() int      { return len(f) }
func (f FieldList) Less(i, j int) bool {
	if f[i].Short != f[j].Short {
		return f[i].Short
	}
	return f[i].Title < f[j].Title
}
<commit_msg>Add new fields to Attachments and Message<commit_after>package slack

type URL string
type Colour string

const (
	Good    = "good"
	Warning = "warning"
	Danger  = "danger"
)

type Message struct {
	UserName    string        `json:"username,omitempty"`
	UserIcon    URL           `json:"icon_url,omitempty"`
	UserEmoji   string        `json:"icon_emoji,omitempty"`
	Channel     string        `json:"channel,omitempty"`
	Attachments []*Attachment `json:"attachments,omitempty"`
	Text        string        `json:"text,omitempty"`
	Markdown    bool          `json:"mrkdwn,omitempty"`
}

type Attachment struct {
	AuthorName string   `json:"author_name,omitempty"`
	AuthorLink string   `json:"author_link,omitempty"`
	AuthorIcon string   `json:"author_icon,omitempty"`
	Title      string   `json:"title,omitempty"`
	TitleLink  string   `json:"title_link,omitempty"`
	ImageURL   string   `json:"image_url,omitempty"`
	ThumbURL   string   `json:"thumb_url,omitempty"`
	Fallback   string   `json:"fallback"`
	Text       string   `json:"text,omitempty"`
	PreText    string   `json:"pretext,omitempty"`
	Colour     Colour   `json:"color,omitempty"` //// Can either be one of 'good', 'warning', 'danger', or any hex color code
	Fields     []*Field `json:"fields,omitempty"`
	Footer     string   `json:"footer,omitempty"`
	FooterIcon string   `json:"footer_icon,omitempty"`
	MarkdownIn []string `json:"mrkdwn_in,omitempty"` /// Can either be one of 'pretext', 'text' or 'fields'
}

type Field struct {
	Title string `json:"title"`           // The title may not contain markup and will be escaped for you
	Value string `json:"value"`           // Text value of the field. May contain standard message markup and must be escaped as normal.  May be multi-line
	Short bool   `json:"short,omitempty"` // Optional flag indicating whether the `value` is short enough to be displayed side-by-side with other values
}

type FieldList []*Field

func (f FieldList) Swap(i, j int) { f[i], f[j] = f[j], f[i] }
func (f FieldList) Len() int      { return len(f) }
func (f FieldList) Less(i, j int) bool {
	if f[i].Short != f[j].Short {
		return f[i].Short
	}
	return f[i].Title < f[j].Title
}

{'fraction_non_alphanumeric': 0.12352032938754504, 'fraction_numerical': 0.0, 'mean_word_length': 3.6439665471923535, 'pattern_counts': {'":': 0, '<': 5, '<?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': '387894', 'n_tokens_mistral': 1210, 'n_tokens_neox': 1201, 'n_words': 382}