utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandPath added in v0.1.11

func ExpandPath(path string) (string, error)

ExpandPath expands the tilde (~) in a path to the user's home directory

func GetImageWidth added in v0.1.11

func GetImageWidth(path string, physicalWidth int, physicalHeight int) (int, image.Image, error)

func PlaceOverlay added in v0.1.11

func PlaceOverlay(x, y int, fg, bg string, opts ...WhitespaceOption) string

PlaceOverlay places fg on top of bg.

func PrintError

func PrintError(err error, exitOnErr bool)

Pretty prints an error to stderr and exits the program if exitOnErr is true

Types

type WhitespaceOption added in v0.1.11

type WhitespaceOption func(*whitespace)

Jump to

Keyboard shortcuts

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