utils

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyToClipboard

func CopyToClipboard(text string)

CopyToClipboard copies text to the system clipboard

func ExpandPath

func ExpandPath(path string) string

ExpandPath expands ~ to home directory, respecting XDG_DATA_HOME for .grove paths

func ExportSessionToJSON

func ExportSessionToJSON(session *models.Session)

ExportSessionToJSON exports a session to a JSON file

func FormatDuration

func FormatDuration(d time.Duration) string

FormatDuration formats a duration in a human-readable format

func OpenInFileManager

func OpenInFileManager(path string)

OpenInFileManager opens a path in the system file manager

func PadStr

func PadStr(s string, width int) string

PadStr pads a string to a fixed width, accounting for ANSI color codes

func TruncateStr

func TruncateStr(s string, maxLen int) string

TruncateStr truncates a string to maxLen, adding "..." if truncated

Types

This section is empty.

Jump to

Keyboard shortcuts

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