utils

package
v0.1.64 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColoredString

func ColoredString(str string, colorAttribute color.Attribute) string

ColoredString takes a string and a colour attribute and returns a colored string with that attribute

func ColoredStringDirect

func ColoredStringDirect(str string, colour *color.Color) string

ColoredStringDirect used for aggregating a few color attributes rather than just sending a single one

func GetCurrentRepoName

func GetCurrentRepoName() string

GetCurrentRepoName gets the repo's base name

func SplitLines

func SplitLines(multilineString string) []string

SplitLines takes a multiline string and splits it on newlines currently we are also stripping \r's which may have adverse effects for windows users (but no issues have been raised yet)

func TrimTrailingNewline

func TrimTrailingNewline(str string) string

TrimTrailingNewline - Trims the trailing newline TODO: replace with `chomp` after refactor

func WithPadding

func WithPadding(str string, padding int) string

WithPadding pads a string as much as you want

Types

This section is empty.

Jump to

Keyboard shortcuts

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