Documentation ¶
Index ¶
- Constants
- func AMatchesB[T comparable](t *testing.T, expected T, actual T)
- func AbsPath(path string) string
- func AllowDebug()
- func AllowNotice()
- func CamelCaseToSnakeCase(s string) string
- func CliError(msg ...interface{})
- func CopyStructToDefault[T interface{}](src, dst T) T
- func Debug(f string, a ...interface{})
- func DebugError(err error)
- func DirectoryExists(path string) bool
- func ErrorMessage(msg string, p ...interface{})
- func ErrorWarning(e error)
- func FatalOnErr(t *testing.T, err error)
- func FileExists(path string) bool
- func FirstLetterToUpper(s string) string
- func FormattedJson(v interface{}) ([]byte, error)
- func GetCallerDir() string
- func GetContentBetween(start string, end string, content string) string
- func GetFileContent(path string) (*bytes.Buffer, error)
- func GetFileHash(path string) string
- func GetFileListExcluding(rootPath string, excluded []string) []string
- func GetFilesList(rootPath string) []string
- func GetRelativePath(dir string, path string) string
- func HashPassword(pass string) string
- func HiGreen(f string, a ...interface{})
- func IF[T any](cond bool, vtrue, vfalse T) T
- func ImportantDebug(f string, a ...interface{})
- func IntToString(i int) string
- func IsDebugMode() bool
- func IsValidEmail(email string) bool
- func LoadStructFromBytes(s interface{}, data []byte) error
- func LoadStructFromFile(s interface{}, yamlPath string) error
- func LogTimeElapsed(start time.Time, name string)
- func MustGetFileContent(path string) *bytes.Buffer
- func NewError(params ...interface{}) error
- func Notice(f string, a ...interface{})
- func PrintAndPanic(err interface{})
- func PrintError(err string, params ...interface{})
- func PrintMessage(f string, a ...interface{})
- func PrintServerResponse(f string, a ...interface{})
- func PrintValidationError(err validator.FieldError)
- func PrintWarningMessage(f string, a ...interface{})
- func RandomString(length int) string
- func RawSha256(data []byte) string
- func Sha256(data string) string
- func StopOnError(err interface{})
- func StringToInt(s string) int
- func TestFailMessage(f string, a ...interface{}) string
- func Title(s string) string
- func ToString(s interface{}) string
- func ToStringPointer(s string) *string
- func ValidateStruct(s interface{}) error
- func Warning(f string, a ...interface{})
- func WriteToFile(path string, data *bytes.Buffer) error
- type ConfContent
- type StructValidatorResult
- type Tester
- type UrlString
Constants ¶
View Source
const NoFileHash = "noFile"
Variables ¶
This section is empty.
Functions ¶
func AMatchesB ¶
func AMatchesB[T comparable](t *testing.T, expected T, actual T)
func AllowDebug ¶
func AllowDebug()
func AllowNotice ¶
func AllowNotice()
func CamelCaseToSnakeCase ¶
func CopyStructToDefault ¶
func CopyStructToDefault[T interface{}](src, dst T) T
func DebugError ¶
func DebugError(err error)
func DirectoryExists ¶
func ErrorMessage ¶
func ErrorMessage(msg string, p ...interface{})
func ErrorWarning ¶
func ErrorWarning(e error)
func FatalOnErr ¶
func FileExists ¶
func FirstLetterToUpper ¶
func FormattedJson ¶
func GetCallerDir ¶
func GetCallerDir() string
func GetFileHash ¶
func GetFileListExcluding ¶
func GetFilesList ¶
func GetRelativePath ¶
func HashPassword ¶
func ImportantDebug ¶
func ImportantDebug(f string, a ...interface{})
func IntToString ¶
func IsDebugMode ¶
func IsDebugMode() bool
func IsValidEmail ¶
func LoadStructFromBytes ¶
func LoadStructFromFile ¶
func LogTimeElapsed ¶
func MustGetFileContent ¶
func PrintAndPanic ¶
func PrintAndPanic(err interface{})
func PrintError ¶
func PrintError(err string, params ...interface{})
func PrintMessage ¶
func PrintMessage(f string, a ...interface{})
func PrintServerResponse ¶
func PrintServerResponse(f string, a ...interface{})
func PrintValidationError ¶
func PrintValidationError(err validator.FieldError)
func PrintWarningMessage ¶
func PrintWarningMessage(f string, a ...interface{})
func RandomString ¶
func StopOnError ¶
func StopOnError(err interface{})
func StringToInt ¶
func TestFailMessage ¶
func ToStringPointer ¶
func ValidateStruct ¶
func ValidateStruct(s interface{}) error
Types ¶
type ConfContent ¶
type ConfContent []byte
func GetConfigContent ¶
func GetConfigContent(file string) ConfContent
func (*ConfContent) ReplaceImports ¶
func (c *ConfContent) ReplaceImports()
func (*ConfContent) ToStringLines ¶
func (c *ConfContent) ToStringLines() []string
type StructValidatorResult ¶
type StructValidatorResult []validator.FieldError
func ValidateGenericStruct ¶
func ValidateGenericStruct(s interface{}) StructValidatorResult
func (StructValidatorResult) HasFieldErrorFor ¶
func (s StructValidatorResult) HasFieldErrorFor(field string) bool
func (StructValidatorResult) SingleError ¶
func (s StructValidatorResult) SingleError() error
Click to show internal directories.
Click to hide internal directories.