commons

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecutableHash

func ExecutableHash(path string) (string, error)

executableHash given the path of the executable generate an hash to be used as name. It is the default way to handle not correct info variable.

func GetNameVersion

func GetNameVersion(path string) (name, version string, err error)

getNameVersion execute the binary with the `-info` option. Then it parse the standard output, parse the JSON and return a name and a version string

func NewFile

func NewFile(path string, source string) error

NewFile create a new file, the path of the file will be the first argument, while its content will be the second one.

func RandomSuffix

func RandomSuffix() string

randomSuffix return a string to be used to generate random temporany directories.

Types

This section is empty.

Jump to

Keyboard shortcuts

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