Go PackagesMapperProject
Examples
Practical mapper examples are available in the official examples repository.
Practical examples are available in the official examples repository:
https://github.com/netlifeguru/examples/mapper
The repository contains standalone examples covering struct scanning, map-based rows, custom mapping, cache keys, field tags, nullable values, edge cases, and error handling.
The examples are intentionally broader than this documentation. Use the documentation to understand the core concepts, and use the examples repository when you need to see a specific scenario in code.
API Examples
- ScanStructRows
- ScanStructSlice
- ScanStructOne
- ScanMapRows
- FillFromMap
- Row converters
- Cache key
- Schema version
- Snake case
- Error handling
Usage Examples
- Getting started
- Select all
- Join
- Single row
- Nullable values
- Map rows
- Cache key
- Many to many
- Scan map fast path
- Field tags
- Ignore extra columns
- Snake case
- Partial result
- Error handling
Edge Case Examples
- Null values
- Extra columns
- Missing columns
- Type conversions
- Pointer fields
- JSON fields
- Empty result
- Too many rows
Repository
https://github.com/netlifeguru/examples/mapper