utils

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandEnvSafe

func ExpandEnvSafe(s string) string

ExpandEnvSafe replaces ${var} or $var in the string according to the values of the current environment variables. As opposed to os.ExpandEnv, ExpandEnvSafe won't remove the dollar in '$(...)' See https://golang.org/src/os/env.go?s=963:994#L22 for the original function

func ExpandField

func ExpandField(input string) string

expandField expands environment variables in field

func ExpandUser

func ExpandUser(path string) (string, error)

ExpandUser expands tild and env vars in unix paths

func GetHomeDir

func GetHomeDir() string

GetHomeDir returns '~' as a path

Types

This section is empty.

Jump to

Keyboard shortcuts

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