Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFilteredWordList ¶
GetFilteredWordList reads a word list from an embedded file identified by the given key, and filters the words based on the specified minimum and maximum length. It returns a slice of strings that meet the length criteria. If the file cannot be opened or read, or if an error occurs during scanning, an error is returned.
func GetJSONPreset ¶
GetJSONPreset reads a JSON preset file identified by the given key from embedded files. It returns the content of the JSON file as a string. If the file is not found, cannot be read, or contains invalid JSON, an error is returned.
func GetWordList ¶
GetWordList retrieves a list of words from an embedded file identified by the given key. The method reads the file content, splits it by newline characters and returns the result as a slice of strings. If the file cannot be found or read, an error is returned.
func LoadJSONFile ¶
LoadJSONFile reads a JSON file from the given file path and returns its content as a string. It handles file reading and JSON unmarshalling. In case of any error during these operations, an error is returned
Types ¶
This section is empty.