panics

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package panics provides checks to help avoid nil pointer panics caused by missing arguments provided to some funcs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoArtM    = errors.New("art models file is nil")
	ErrNoBoil    = errors.New("exec boil context executor is nil or invalid")
	ErrNoBuffer  = errors.New("bytes buffer pointer is nil")
	ErrNoContext = errors.New("ctx context is nil")
	ErrNoDB      = errors.New("db database pointer is nil")
	ErrNoEchoE   = errors.New("e echo pointer is nil")
	ErrNoEchoC   = errors.New("c echo context pointer is nil")
	ErrNoEmbed   = errors.New("embed file system instance is empty")
	ErrNoGroup   = errors.New("g echo group pointer is nil")
	ErrNoSlog    = errors.New("sl slog logger pointer is nil")
	ErrNoTx      = errors.New("tx transaction pointer is nil")
)

Functions

func BoilExec

func BoilExec(exec boil.ContextExecutor) bool

BoilExec returns true if the database context executor is invalid such as nil.

func BoilExecCrash

func BoilExecCrash(exec boil.ContextExecutor)

BoilExecCrash panics if the exec boil context extractor is invalid. This is a fallback function intended for the model packages to reduce programmign boilerplate by requiring only the function without conditional statements.

func CD added in v1.12.0

func CD(ctx context.Context, db *sql.DB) error

func CE added in v1.12.0

func CS added in v1.12.0

func CS(ctx context.Context, sl *slog.Logger) error

func CSD added in v1.12.0

func CSD(ctx context.Context, sl *slog.Logger, db *sql.DB) error

func CSDTx added in v1.12.0

func CSDTx(ctx context.Context, sl *slog.Logger, db *sql.DB, tx *sql.Tx) error

func CSE added in v1.12.0

func CSE(ctx context.Context, sl *slog.Logger, exec boil.ContextExecutor) error

func CTx added in v1.12.0

func CTx(ctx context.Context, tx *sql.Tx) error

func ECD added in v1.12.0

func ECD(c *echo.Context, db *sql.DB) error

func EP added in v1.12.0

func EP(e *echo.Echo, public embed.FS) error

func GD added in v1.12.0

func GD(g *echo.Group, db *sql.DB) error

func SC added in v1.12.0

func SC(c *echo.Context, sl *slog.Logger) error

func SCD added in v1.12.0

func SCD(sl *slog.Logger, c *echo.Context, db *sql.DB) error

func SD added in v1.12.0

func SD(sl *slog.Logger, db *sql.DB) error

func SDE added in v1.12.0

func SDE(sl *slog.Logger, db *sql.DB, e *echo.Echo) error

func SDEP added in v1.12.0

func SDEP(sl *slog.Logger, db *sql.DB, e *echo.Echo, public embed.FS) error

func SE added in v1.12.0

func SE(sl *slog.Logger, e *echo.Echo) error

func SGD added in v1.12.0

func SGD(sl *slog.Logger, g *echo.Group, db *sql.DB) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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