Documentation
¶
Overview ¶
Package casing holds snake_case <-> camelCase helpers used internally by the GoFastr framework. Hook payloads are snake_cased; generated structs use camelCase JSON tags. These helpers translate between the two.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyMapping ¶
ApplyMapping converts keys using a precomputed mapping. Skips keys not in the mapping (passes them through as-is). Zero allocations for the mapping lookup; one allocation for the result map.
func MapToCamel ¶
MapToCamel converts all snake_case keys in a map to camelCase. Reuses the input map's capacity for the result.
func MapToSnake ¶
MapToSnake converts all camelCase keys in a map to snake_case.
func PrecomputeMapping ¶
PrecomputeMapping builds a snake→camel mapping for a fixed set of column names. The returned map can be passed to ApplyMapping for zero-alloc key conversion on each row. Call this once at entity Define() time.
Types ¶
This section is empty.