util

package
v1.15.1-beta.6 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 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

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
Package goleaktest provides a small helper for wiring go.uber.org/goleak into a package's TestMain so goroutine leaks fail the test suite.
Package goleaktest provides a small helper for wiring go.uber.org/goleak into a package's TestMain so goroutine leaks fail the test suite.
iojoin provides a utility for joining two concurrent units of work that share resources.
iojoin provides a utility for joining two concurrent units of work that share resources.

Jump to

Keyboard shortcuts

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