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

resolve

package
v1.0.109 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Directory

func Directory(dir string, baseDir string, create bool) (resolved string, err error)

Directory returns the absolute directory name relative to baseDir. If the directory does not exist and create is false, a "not found" error is returned.

func ExpandPath added in v0.16.101

func ExpandPath(file string) string

ExpandPath returns extrapolated path with resolved ~ or env vars. It replaces ${var} or $var in the string according to the values of the current environment variables. References to undefined variables are replaced by the empty string.

func File

func File(file string, baseDir string) (resolved string, err error)

File returns the absolute file name relative to baseDir. If the file does not exist, a "not found" error is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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