homedir

package
v2.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package homedir provides functions for expanding paths like ~/.ssh.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPath = errors.New("invalid path")

ErrInvalidPath is returned when the given path is invalid.

Functions

func Expand

func Expand(dir string) (string, error)

Expand does ~/ style path expansion for files under current user home. ~user/ style paths are not supported.

func ExpandDir

func ExpandDir(path string) (string, error)

ExpandDir expands the path and checks that it is an existing directory.

func ExpandFile

func ExpandFile(path string) (string, error)

ExpandFile expands the path and checks that it is an existing file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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