Help us shape the future of Go! Take the 2026 Go Developer Survey

paths

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package paths resolves the user's home directory and expands ~-prefixed paths against it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expand

func Expand(home, path string) (string, error)

Expand joins ~-prefixed paths against home and rejects ~user forms.

func FormatHomeError

func FormatHomeError(err error) string

FormatHomeError maps ResolveHome's errors to their user-facing reason strings.

func ResolveHome

func ResolveHome() (string, error)

ResolveHome returns the user's home directory, preferring $HOME and falling back to os/user.

Types

This section is empty.

Jump to

Keyboard shortcuts

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