utils

package
v3.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 25, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandHome

func ExpandHome(path string) (string, error)

ExpandHome expands the path to include the home directory if the path is prefixed with `~`. If it isn't prefixed with `~`, the path is returned as-is. Via https://github.com/mitchellh/go-homedir/blob/master/homedir.go

func NormalizeCommand

func NormalizeCommand(commandPath string) (string, error)

func NormalizeFilePath

func NormalizeFilePath(path string) (string, error)

Normalizes a path and returns an clean absolute version. It correctly expands environment variables inside paths, converts "~/" into the users home directory, and replaces "./" with the current working directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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