utils

package
v0.0.0-...-4ac1f56 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckErr

func CheckErr(err error)

CheckErr is a silly wrapper for error checking and panicking

func Cyan

func Cyan(v string) string

Cyan returns a provided string wrapped in escape codes that turns the text to cyan

func Levenshtein

func Levenshtein(a, b string) int

Levenshtein calculates the difference between two strings by using the Levenshtein algorithm

func Magenta

func Magenta(v string) string

Magenta returns a provided string wrapped in escape codes that turns the text to Magenta

func PrintItems

func PrintItems(items []*models.Item)

PrintItems prints provided items aligned and separated by a colon

func Underline

func Underline(v string) string

Underline returns a provided string wrapped in escape codes that underlines the text

func WriteTextToClipboard

func WriteTextToClipboard(value string)

WriteTextToClipboard sends a given string to the System clipboard. Currently only compatible with macOS

Types

This section is empty.

Jump to

Keyboard shortcuts

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