util

package
v0.18.5 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandTilde added in v0.18.4

func ExpandTilde(path string) string

ExpandTilde expands environment variables and a leading ~ or ~/ to the user's home directory. If the home directory cannot be determined, the original path is returned unchanged.

func RandStringBytes

func RandStringBytes(n int) string

func UserHomeDir

func UserHomeDir() (string, error)

UserHomeDir returns the home directory for the executing user.

This extends the logic of os.UserHomeDir() with the now archived package github.com/mitchellh/go-homedir for compatibility.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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