util

package
v0.0.0-...-4c6df9b Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2018 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsPathify

func AbsPathify(inPath string) string

AbsPathify takes a path, cleans it, replace env variables in it and transform it to an absolute path.

func Exists

func Exists(name string) bool

Exists reports whether the named file or directory exists.

func GetStructType

func GetStructType(i interface{}) (reflect.Type, error)

GetStructType returns a struct from its reflection type.

func Host

func Host() string

Host is a simple function that returns the current host name if possible, 127.0.0.1 otherwise.

func InitializeStruct

func InitializeStruct(t reflect.Type, v reflect.Value)

InitializeStruct initialize a Go struct from reflect type and value.

func New

func New(t reflect.Type) interface{}

New creates a new instance of the given type interface

func UserHomeDir

func UserHomeDir() string

UserHomeDir returns the user home directory in a crossplatform way.

Types

This section is empty.

Jump to

Keyboard shortcuts

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