Documentation ¶
Index ¶
- func ContainsStringInFile(file io.Reader, target string, caseInsensitive bool) (bool, error)
- func FileExists(searchPath, name string) bool
- func FindAllFiles(searchPath, name string) []string
- func FindFile(searchPath, name string) string
- func GetJSONValue(keyPath []string, filePath string, caseInsensitive bool) (value interface{}, ok bool)
- func GetMapValue(keyPath []string, data map[string]interface{}) (value interface{}, ok bool)
- func GetTOMLValue(keyPath []string, filePath string, caseInsensitive bool) (value interface{}, ok bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsStringInFile ¶
ContainsStringInFile checks if the given file contains the given string
func FileExists ¶
FileExists checks if the file exists
func FindAllFiles ¶
FindAllFiles searches for the file inside the path recursively and returns all matches
func FindFile ¶
FindFile searches for the file inside the path recursively and returns the full path of the file if found If multiple files exist, tries to return the one closest to root
func GetJSONValue ¶ added in v0.1.2
func GetJSONValue(keyPath []string, filePath string, caseInsensitive bool) (value interface{}, ok bool)
GetJSONValue gets a value from a JSON file, by traversing the path given
func GetMapValue ¶ added in v0.1.2
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.