Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetExecutablePath ¶
GetExecutablePath gets the path of the current executable.
func LoadJSONFromFile ¶ added in v1.2.0
LoadJSONFromFile loads a JSON file from `path` and populated the given `model`.
func ParseConfig ¶
func ParseConfig(model interface{}) error
ParseConfig reads a `config.json` file on the same directory as the executable and parses its JSON to the given model.
func SafeJoinPaths ¶
SafeJoinPaths joins `path1` and `path2` and applies the correct separator.
func StringToInt ¶
StringToInt converts a string to an int, and if the conversion fails, it uses the `defaultValue`.
func WriteJSONToFile ¶ added in v1.3.0
WriteJSONToFile writes the given `model` struct as JSON to the file at `path`
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.