Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckErr ¶
func CheckErr(e error, v ...interface{})
CheckErr takes an error and an optional list of things, and if the error exists logs the error and the string values for the things and then exits the program. Not sure if this is a good thing or not.
func FileInGoPath ¶
FileInGoPath returns a file from the full path from the system's GOPATH of the passed in relative path value.
func FilePathInGoPath ¶
FilePathInGoPath returns a full path from the system's GOPATH of the passed in relative path value. TODO: Support for multiple GOPATHs
func GetGOPATH ¶
func GetGOPATH() string
GetGOPATH returns the value of the GOPATH variable if set, and if not returns the default GOPATH.
func OpenBrowser ¶
OpenBrowser opens up a browser in the underlying operating system at the given URL.
func ToJSON ¶ added in v1.0.0
func ToJSON(v interface{}) string
ToJSON takes in an entity and returns a formatted JSON string.
func ToJSONBytes ¶ added in v1.0.0
func ToJSONBytes(v interface{}) []byte
ToJSONBytes takes in an entity and returns formatted JSON as a byte array.
Types ¶
type ExecCommand ¶
ExecCommand is a struct used to hold the command values passed to exec.Command()