utils

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DataPath = "./scripts/spec_align_report/data"

Variables

View Source
var (
	Success = Green
	Info    = Teal
	Warn    = Yellow
	Error   = Red
)
View Source
var (
	Black   = Color("\033[1;30m%s\033[0m")
	Red     = Color("\033[1;31m%s\033[0m")
	Green   = Color("\033[1;32m%s\033[0m")
	Yellow  = Color("\033[1;33m%s\033[0m")
	Purple  = Color("\033[1;34m%s\033[0m")
	Magenta = Color("\033[1;35m%s\033[0m")
	Teal    = Color("\033[1;36m%s\033[0m")
	White   = Color("\033[1;37m%s\033[0m")
)

Functions

func CleanSpecPath

func CleanSpecPath() error

func CloneSpec

func CloneSpec(tag string, commit string) error

func Color

func Color(colorString string) func(...interface{}) string

func Copy

func Copy(srcPath, dstPath string) (err error)

Copy copies the contents of the file at srcpath to a regular file at dstpath. If dstpath already exists and is not a directory, the function truncates it. The function does not copy file modes or file attributes.

func GitDiff

func GitDiff(name string, ssv string, spec string) error

func Mkdir

func Mkdir(path string, clean bool) (err error)

Types

type Compare

type Compare struct {
	Name        string
	Replace     []KeyValue
	SpecReplace []KeyValue
	SSVPath     string
	SpecPath    string
}

func (*Compare) ReplaceMap

func (c *Compare) ReplaceMap() error

func (*Compare) Run

func (c *Compare) Run() error

type KeyValue

type KeyValue struct {
	Key   string
	Value string
}

type Map

type Map struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap() *Map

func (*Map) Range

func (m *Map) Range() []KeyValue

func (*Map) Set

func (m *Map) Set(k string, v string)

Jump to

Keyboard shortcuts

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