Documentation
¶
Index ¶
- Variables
- func AnyEquals[T comparable](list []T, value T) bool
- func BoolToString(value bool) string
- func ExtensionMatches(extensionList []string, filePath string) bool
- func FileExists(filePath string) bool
- func FilePathToPageName(allowedExtensions []string, filePath string) string
- func FormatPageNameInput(pageName string) string
- func GetFileExtension(filePath string) string
- func GetNthWord(str, divisor string, index int, fallback string) string
- func MapValueSearch[TMapKey comparable, TMapValue comparable](subject map[TMapKey]TMapValue, valueToBeSearched TMapValue, fallback TMapKey) TMapKey
- func RegexTest(regex string, subject string) bool
- func RegexTestAny(regexList []string, subject string) bool
- func RemoveNth[T interface{}](list []T, iToRemove int) []T
- func ReplaceRegex(subject string, find []string, replaceWith string) string
- func StringToBool(str string) bool
- func TrimEmptyLines(text string) string
- func ValidateFiles(filePaths []string, acceptedExtensions []string) map[string]error
- func Wget(url string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExtensionNotAccepted = errors.New("ErrExtensionNotAccepted")
View Source
var ErrFileDoesNotExist = errors.New("ErrFileDoesNotExist")
Functions ¶
func AnyEquals ¶
func AnyEquals[T comparable](list []T, value T) bool
func BoolToString ¶
func ExtensionMatches ¶
func FileExists ¶
func FilePathToPageName ¶
func FormatPageNameInput ¶
func GetFileExtension ¶
func MapValueSearch ¶
func MapValueSearch[TMapKey comparable, TMapValue comparable]( subject map[TMapKey]TMapValue, valueToBeSearched TMapValue, fallback TMapKey, ) TMapKey
func RegexTestAny ¶
func ReplaceRegex ¶ added in v0.2.0
func StringToBool ¶
func TrimEmptyLines ¶ added in v0.2.1
func ValidateFiles ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.