Documentation
¶
Overview ¶
Files package contains functions to search and read files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBytesFromPath ¶
GetBytesFromPath returns the content of the given file as []byte and its length. If an error occurs, it is returned instead.
func SearchConfigFile ¶
SearchConfigFile searches for config files named <modname>.<fileext> in the following locations
- current working directory
- <user specific config directory (most ~/.config)>/<modname>
- /usr/local/etc/<modname>
- /etc/<modname>
The first existing file is returned. If none is found, an error is returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.