utils

package
v0.24.4-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Reset string = "\033[0m"

Variables

This section is empty.

Functions

func ColorText

func ColorText(text string, color StdOutColor) string

func CreateLinesMapForFiles

func CreateLinesMapForFiles(files map[string][]byte) map[string]map[int]string

CreateLinesMapForFiles creates a map of file paths to line maps. It takes in a map of file paths to file content.

func FormatCheckResult

func FormatCheckResult(res analyzer.CheckResult, fileLinesMap map[string]map[int]string) string

func FormatSpecError

func FormatSpecError(specError analyzer.SpecError, fileLinesMap map[string]map[int]string) string

Types

type StdOutColor

type StdOutColor string
const (
	Red    StdOutColor = "\033[31m"
	Green  StdOutColor = "\033[32m"
	Yellow StdOutColor = "\033[33m"
	Blue   StdOutColor = "\033[34m"
	Purple StdOutColor = "\033[35m"
	Cyan   StdOutColor = "\033[36m"
	Gray   StdOutColor = "\033[37m"
	White  StdOutColor = "\033[97m"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL