<commit_before># [DRAFT]

# How to create a new car


## Naming

The car needs to have a fitting package name that matches the current convention: `carSomeName`
The name is prefixed by `car`.

## Template:

Here is a demo template you can use to start off your new `car`. It shows basic implementation of the `carRenderer` interface.

```go
package carDemo

import (
	"fmt"
	"os"

	"github.com/bullettrain-sh/bullettrain-go-core/ansi"
)

const (
    carPaint = "black:white"
    symbolIcon = "€"
    symbolPaint = "black:white"
)

// Demo Car
type Car struct {
	paint string
}

// GetPaint returns the calculated end paint string for the car.
func (c *Car) GetPaint() string {
	if c.paint = os.Getenv("BULLETTRAIN_CAR_DEMO_PAINT"); c.paint == "" {
		c.paint = carPaint
	}

	return c.paint
}

func paintedSymbol() string {
	var timeSymbol string
	if timeSymbol = os.Getenv("BULLETTRAIN_CAR_DEMO_SYMBOL_ICON"); timeSymbol == "" {
		timeSymbol = symbolIcon
	}

	var timeSymbolPaint string
	if timeSymbolPaint = os.Getenv("BULLETTRAIN_CAR_DEMO_SYMBOL_PAINT"); timeSymbolPaint == "" {
		timeSymbolPaint = symbolPaint
	}

	return ansi.Color(timeSymbol, timeSymbolPaint)
}

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

	return s
}

// Render builds and passes the end product of a completely composed car onto
// the channel.<commit_msg>Editing readme.<commit_after># How to create a new car

This document will describe the process to add new car plugin in Go.

## Naming

The car needs to have a fitting package name that matches the current convention: `carSomeName`
The name is prefixed by `car`.

## Template:

Here is a demo template you can use to start off your new `car`. It shows basic implementation of the `carRenderer` interface.

```go
package carDemo

import (
	"fmt"
	"os"

	"github.com/bullettrain-sh/bullettrain-go-core/ansi"
)

const (
    carPaint = "black:white"
    symbolIcon = "€"
    symbolPaint = "black:white"
)

// Demo Car
type Car struct {
	paint string
}

// GetPaint returns the calculated end paint string for the car.
func (c *Car) GetPaint() string {
	if c.paint = os.Getenv("BULLETTRAIN_CAR_DEMO_PAINT"); c.paint == "" {
		c.paint = carPaint
	}

	return c.paint
}

func paintedSymbol() string {
	var demoSymbol string
	if demoSymbol = os.Getenv("BULLETTRAIN_CAR_DEMO_SYMBOL_ICON"); demoSymbol == "" {
		demoSymbol = symbolIcon
	}

	var timeSymbolPaint string
	if timeSymbolPaint = os.Getenv("BULLETTRAIN_CAR_DEMO_SYMBOL_PAINT"); timeSymbolPaint == "" {
		timeSymbolPaint = symbolPaint
	}

	return ansi.Color(demoSymbol, timeSymbolPaint)
}

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

	return s
}

// Render builds and passes the end product of a completely composed car onto
// the channel.
{'fraction_non_alphanumeric': 0.10436241610738255, 'fraction_numerical': 0.0, 'mean_word_length': 3.919141914191419, 'pattern_counts': {'":': 0, '<': 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': '2327635', 'n_tokens_mistral': 1034, 'n_tokens_neox': 1004, 'n_words': 334}