util

package
v0.3.0-beta Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package util provides utility functions for context handling, string sanitization, and reflection helpers used throughout the Relica library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCanceled

func IsCanceled(ctx context.Context) bool

IsCanceled checks if the context has been canceled.

func ModelToColumns

func ModelToColumns(model interface{}) map[string]string

ModelToColumns extracts database columns from struct tags.

func SanitizeIdentifier

func SanitizeIdentifier(ident string) string

SanitizeIdentifier validates and sanitizes database identifiers by removing non-word characters.

func SanitizeString

func SanitizeString(input string) string

SanitizeString removes potentially dangerous SQL characters from input.

func WithTimeout

func WithTimeout(parent context.Context, timeout time.Duration) (context.Context, context.CancelFunc)

WithTimeout creates a context with the specified timeout duration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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