utils

package
v2.7.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BrowserLauncher

func BrowserLauncher() ([]string, error)

func Check

func Check(err error)

func CommandPath

func CommandPath(cmd string) (string, error)

func ConcatPaths

func ConcatPaths(paths ...string) string

func IsOption

func IsOption(confirm, short, long string) bool

func RgbToTermColorCode

func RgbToTermColorCode(color *Color) string

func TimeAgo

func TimeAgo(t time.Time) string

Types

type Color

type Color struct {
	Red   int64
	Green int64
	Blue  int64
}

func NewColor

func NewColor(hex string) (*Color, error)

func (*Color) Brightness

func (c *Color) Brightness() float32

func (*Color) Distance

func (c *Color) Distance(other *Color) float64

Jump to

Keyboard shortcuts

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