Documentation
¶
Index ¶
- Variables
- func CleanDoubleColonPattern(input string) string
- func CleanUpString(s string) string
- func ConvertAllToString(value interface{}) string
- func CopyFile(sourcePath, targetPath string) error
- func CreateFile(fullPath string, deleteIfExist bool) (*os.File, error)
- func CreateFolder(folder string) error
- func DeleteFile(filePath string) error
- func DeleteFolder(folderPath string) error
- func EmptyOrDefault[T any](s T, def T, check ...ZeroChecker[T]) T
- func EmptyOrError[T any](s T, message string, check ...ZeroChecker[T]) error
- func GetAbsolutePath(path string) (string, error)
- func GetColoredHttpMethod(httpMethod string) string
- func GetCurrentDirectory() (string, error)
- func HashByte(queryByte []byte) string
- func HashString(query string) string
- func IsFileExists(filename string) bool
- func IsFolderExists(folderPath string) bool
- func IsStringContainSpace(input string) bool
- func MatchReplacer(query string, paramKey string, replacement string) string
- func ParseBool(str string) bool
- func ParseTag(rawTag string) map[string]string
- func RemoveByIndex[T any](source []T, index []int) []T
- func RemoveParenthesesContent(input string) string
- func SendRequest(httpMethod string, url string, body []byte, ...) ([]byte, error)
- func SnakeCaseToPascalCase(s string) string
- func ToCamelCase(s string) string
- func ToGoModuleName(s string) string
- func ToKebabCase(s string) string
- func ToSnakeCase(s string) string
- type SendRequestError
- type ZeroChecker
Constants ¶
This section is empty.
Variables ¶
View Source
var FileLogger = logger.HcLog().Named("raiden.utils.file")
Functions ¶
func CleanDoubleColonPattern ¶
func CleanUpString ¶
func ConvertAllToString ¶
func ConvertAllToString(value interface{}) string
func CreateFolder ¶
func DeleteFile ¶
func DeleteFolder ¶
func EmptyOrDefault ¶ added in v1.0.0
func EmptyOrDefault[T any](s T, def T, check ...ZeroChecker[T]) T
EmptyOrDefault returns def when s is considered "empty". Works whether T is a value or a pointer type.
func EmptyOrError ¶ added in v1.0.0
func EmptyOrError[T any](s T, message string, check ...ZeroChecker[T]) error
EmptyOrError returns an error when s is considered "empty". Works whether T is a value or a pointer type.
func GetAbsolutePath ¶
func GetColoredHttpMethod ¶
func GetCurrentDirectory ¶
func HashString ¶
func IsFileExists ¶
func IsFolderExists ¶
func IsStringContainSpace ¶
func RemoveByIndex ¶
Function to remove multiple elements by multiple index
func RemoveParenthesesContent ¶
RemoveParenthesesContent removes content within parentheses from a string.
func SendRequest ¶
func SnakeCaseToPascalCase ¶
func ToCamelCase ¶
func ToGoModuleName ¶
func ToKebabCase ¶ added in v1.0.0
func ToSnakeCase ¶
Types ¶
type SendRequestError ¶
func (SendRequestError) Error ¶
func (s SendRequestError) Error() string
type ZeroChecker ¶ added in v1.0.0
Optional: callers can override what "empty" means for T.
Click to show internal directories.
Click to hide internal directories.