util

package
v0.0.0-...-eb599cc Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorToHex

func ColorToHex(c color.RGBA) string

ColorToHex turns a color.RGBA into a hexadecimal color code e.g. #FBEE13. The alpha value is ignored.

func ExactlyOne

func ExactlyOne(bs ...bool) bool

ExactlyOne returns true iff one of the given booleans is true

func HexToColor

func HexToColor(s string) (c color.RGBA, err error)

HexToColor turns a hexadecimal color code (e.g. #FBEE13) into a color.RGBA.

func RemoveWhitespaceStrings

func RemoveWhitespaceStrings(a []string) []string

RemoveWhitespaceStrings removes any strings from the input slice that contain only whitespace and trims whitespace from the remaining lines.

func UniqueStr

func UniqueStr(slice []string) []string

UniqueStr removes duplicates from a string slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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