metron

package module
v0.0.0-...-3b9e86b Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 6 Imported by: 0

README

metron

Internal library for a bunch of things.

Install

go get github.com/Eric-Vondee/metron

Test

go test ./...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsArrayEmpty

func IsArrayEmpty[T any](s []T) bool

func IsStringEmpty

func IsStringEmpty(s string) bool

func ValidateStruct

func ValidateStruct[T any](payload T) error

Types

type FieldError

type FieldError struct {
	Field   string `json:"field"`
	Rule    string `json:"rule"`
	Message string `json:"message"`
}

FieldError describes a single field that failed validation.

type FieldErrors

type FieldErrors []FieldError

FieldErrors is the set of validation failures for a payload. It implements error.

func (FieldErrors) Error

func (fe FieldErrors) Error() string

Jump to

Keyboard shortcuts

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