utils

package
v1.0.0-alpha-rc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanUpString

func CleanUpString(s string) string

func CopyFile

func CopyFile(sourcePath, targetPath string) error

func CreateFile

func CreateFile(fullPath string, deleteIfExist bool) (*os.File, error)

func CreateFolder

func CreateFolder(folder string) error

func DeleteFile

func DeleteFile(filePath string) error

func DeleteFolder

func DeleteFolder(folderPath string) error

func GetAbsolutePath

func GetAbsolutePath(path string) (string, error)

func GetColoredHttpMethod

func GetColoredHttpMethod(httpMethod string) string

func GetCurrentDirectory

func GetCurrentDirectory() (string, error)

func HashByte

func HashByte(queryByte []byte) string

func HashString

func HashString(query string) string

func IsFileExists

func IsFileExists(filename string) bool

func IsFolderExists

func IsFolderExists(folderPath string) bool

func IsStringContainSpace

func IsStringContainSpace(input string) bool

func MatchReplacer

func MatchReplacer(query string, paramKey string, replacement string) string

func ParseBool

func ParseBool(str string) bool

func ParseTag

func ParseTag(rawTag string) map[string]string

func RemoveParenthesesContent

func RemoveParenthesesContent(input string) string

RemoveParenthesesContent removes content within parentheses from a string.

func SendRequest

func SendRequest(httpMethod string, url string, body []byte, reqInterceptor func(req *fasthttp.Request)) ([]byte, error)

func SnakeCaseToPascalCase

func SnakeCaseToPascalCase(s string) string

func ToCamelCase

func ToCamelCase(s string) string

func ToGoModuleName

func ToGoModuleName(s string) string

func ToPlural

func ToPlural(word string) string

func ToSnakeCase

func ToSnakeCase(s string) string

Types

type SendRequestError

type SendRequestError struct {
	Message string
	Body    []byte
}

func (SendRequestError) Error

func (s SendRequestError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL