<commit_before>package carContext

import (
	"fmt"
	"os"
	"os/user"

	"github.com/mgutz/ansi"
)

// Context car
type Context struct {
	paint string
}

// GetPaint returns the calculated end paint string for the car.
func (t *Context) GetPaint() string {
	if t.paint = os.Getenv("BULLETTRAIN_CAR_CONTEXT_PAINT"); t.paint == "" {
		t.paint = "black:white"
	}

	return t.paint
}

// CanShow decides if this car needs to be displayed.
func (t *Context) CanShow() bool {
	s := true
	if e := os.Getenv("BULLETTRAIN_CAR_CONTEXT_SHOW"); e == "false" {
		s = false
	}

	return s
}

// Render builds and passes the end product of a completely composed car onto
// the channel.
func (t *Context) Render(out chan<- string) {
	defer close(out)

	var username string
	u, e := user.Current()
	if e == nil {
		username = u.Username
	} else {
		username = "---"
	}

	hostname, e := os.Hostname()
	if e != nil {
		hostname = "---"
	}

	out <- ansi.Color(fmt.Sprintf(" %s@%s ", username, hostname),
		t.GetPaint())
}

// GetSeparatorPaint overrides the Fg/Bg colours of the right hand side
// separator through ENV variables.
func (t *Context) GetSeparatorPaint() string {
	return os.Getenv("BULLETTRAIN_CAR_CONTEXT_SEPARATOR_PAINT")
}<commit_msg>Removing spaces to control them elsewhere.<commit_after>package carContext

import (
	"fmt"
	"os"
	"os/user"

	"github.com/mgutz/ansi"
)

// Context car
type Context struct {
	paint string
}

// GetPaint returns the calculated end paint string for the car.
func (t *Context) GetPaint() string {
	if t.paint = os.Getenv("BULLETTRAIN_CAR_CONTEXT_PAINT"); t.paint == "" {
		t.paint = "black:white"
	}

	return t.paint
}

// CanShow decides if this car needs to be displayed.
func (t *Context) CanShow() bool {
	s := true
	if e := os.Getenv("BULLETTRAIN_CAR_CONTEXT_SHOW"); e == "false" {
		s = false
	}

	return s
}

// Render builds and passes the end product of a completely composed car onto
// the channel.
func (t *Context) Render(out chan<- string) {
	defer close(out)

	var username string
	u, e := user.Current()
	if e == nil {
		username = u.Username
	} else {
		username = "---"
	}

	hostname, e := os.Hostname()
	if e != nil {
		hostname = "---"
	}

	out <- ansi.Color(fmt.Sprintf("%s@%s", username, hostname),
		t.GetPaint())
}

// GetSeparatorPaint overrides the Fg/Bg colours of the right hand side
// separator through ENV variables.
func (t *Context) GetSeparatorPaint() string {
	return os.Getenv("BULLETTRAIN_CAR_CONTEXT_SEPARATOR_PAINT")
}
{'fraction_non_alphanumeric': 0.13572291582762788, 'fraction_numerical': 0.0, 'mean_word_length': 3.5577981651376147, 'pattern_counts': {'":': 0, '<': 7, '<?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': '6849534', 'n_tokens_mistral': 920, 'n_tokens_neox': 896, 'n_words': 268}