# Documentation - [Documentation](/docs): NetLife Guru documentation for Go packages and backend development tools. - [About](/docs/go/form): Type-safe form and request validation for Go applications with reusable schemas, composable rules, conditional validation, HTTP binding, and structured error responses. - [About](/docs/go/db): DB is a shared Go database layer used by NetLifeGuru database drivers for querying, execution, transactions, dialect SQL, and result mapping. - [Multi-Driver](/docs/go/db/multi-driver): Build applications that can run with multiple database drivers using db.DialectSQL, SQL files, and the shared DB API. - [SQL Files](/docs/go/db/sql-files): Load driver-specific SQL and CQL files into typed query models using db.LoadModel and db.DialectSQL. - [Logger Introduction](/docs/go/logger): undefined - [About](/docs/go/router): undefined - [Dynamic Rows](/docs/go/mapper/dynamic-rows): Work with dynamic row maps, typed row helpers, and manual struct mapping. - [Edge Cases](/docs/go/mapper/edge-cases): Understand how mapper handles null values, missing columns, extra columns, type conversions, pointers, JSON fields, and row count errors. - [About](/docs/go/mapper): Mapper is a lightweight Go package for scanning database rows into structs, maps, or custom row handlers. - [Mapping](/docs/go/mapper/mapping): Learn how mapper matches database columns to Go struct fields. - [Conditional Rules](/docs/go/form/conditional/conditional-rules): Learn how to use NLG Form conditional rule helpers for required-if, prohibited-if, required-with, and required-without validation flows. - [Conditional When](/docs/go/form/conditional/conditional-when): Learn how to use conditional.When in NLG Form to run validation rules only when custom runtime predicates match. - [Conditional Validation](/docs/go/form/conditional): Learn how conditional validation works in NLG Form using conditional rules, runtime predicates, When helpers, and reusable validation pipelines. - [Installation](/docs/go/form/getting-started/installation): Install the NLG Form package for Go applications and integrate reusable validation schemas, rules, HTTP request validation, and structured form processing into your project. - [Getting Started](/docs/go/form/getting-started/quick-start): Learn how to validate JSON HTTP requests using reusable schemas, typed validation fields, and structured validation rules with the NLG Form package. - [Validation Philosophy](/docs/go/form/getting-started/validation-philosophy): Learn how NLG Form uses explicit, type-safe, reusable validation schemas instead of struct tags and reflection-heavy validation pipelines. - [Response Customization](/docs/go/form/http-validation/response-customization): Learn how to customize validation responses in NLG Form using custom messages, unique error codes, and configurable HTTP validation response options. - [HTTP Responses](/docs/go/form/http-validation/responses): Learn how NLG Form binds and validates HTTP JSON requests and returns structured validation responses using map responses, flat responses, custom messages, invalid JSON handling, and unique error codes. - [Examples Repository](/docs/go/form/project/examples): Browse runnable examples and practical validation workflows for the NLG Form package. - [Project Information](/docs/go/form/project/info): Documentation links, versioning policy, contribution guidelines, licensing, and project resources for the NLG Form package. - [Config](/docs/go/db/connections/config): Configure database connections using the shared db.Config structure. - [Pools](/docs/go/db/connections/pools): Understand connection pools, identifiers, shared pools, Fork, and Close behavior across DB drivers. - [Optional Validation](/docs/go/form/optional): Learn how optional validation works in NLG Form using OptionalString, OptionalPtr, OptionalSlice, nullable fields, and conditional validation pipelines. - [Optional Float64 Validation](/docs/go/form/optional/optional-float64): Learn how optional float64 validation works in NLG Form using nullable float fields, OptionalFloat64, minimum, maximum, and range validation. - [Optional Integer Validation](/docs/go/form/optional/optional-int): Learn how optional integer validation works in NLG Form using nullable integer fields, OptionalInt, minimum, maximum, positivity, and range validation. - [Optional Pointer Validation](/docs/go/form/optional/optional-ptr): Learn how optional pointer validation works in NLG Form using OptionalPtr, nullable fields, PATCH APIs, nested objects, and reusable conditional validation pipelines. - [Optional Slice Validation](/docs/go/form/optional/optional-slice): Learn how optional slice validation works in NLG Form using OptionalSlice, optional arrays, collection validation, item limits, and reusable validation pipelines. - [Optional String Validation](/docs/go/form/optional/optional-string): Learn how optional string validation works in NLG Form using OptionalString, conditional rule execution, blank value skipping, and reusable validation pipelines. - [Optional Time Validation](/docs/go/form/optional/optional-time): Learn how optional time validation works in NLG Form using nullable time fields, OptionalTime, date ranges, scheduling validation, and reusable time-based validation pipelines. - [Installation](/docs/go/db/getting-started/installation): Install a NetLifeGuru database driver and use the shared DB layer in your Go project. - [MySQL](/docs/go/db/getting-started/mysql): Create a MySQL connection using the NetLifeGuru MySQL driver and the shared DB layer. - [Overview](/docs/go/db/getting-started/overview): Understand how the DB package works with NetLifeGuru database drivers and mapper. - [PostgreSQL](/docs/go/db/getting-started/postgres): Create a PostgreSQL connection using the NetLifeGuru PostgreSQL driver and the shared DB layer. - [Scylla](/docs/go/db/getting-started/scylla): Create a ScyllaDB connection using the NetLifeGuru Scylla driver and the shared DB layer. - [Examples](/docs/go/db/project/examples): Practical examples for DB usage with MySQL, PostgreSQL, Scylla, and shared database helpers. - [Project Information](/docs/go/db/project/info): Documentation links, versioning policy, contribution guidelines, licensing, and project resources for the NLG DB package. - [Delete](/docs/go/db/mutations/delete): Delete rows using the shared DB API across supported drivers. - [Exec](/docs/go/db/mutations/exec): Execute SQL or CQL statements using Exec, ExecQuery, Insert, Update, and Delete. - [Insert](/docs/go/db/mutations/insert): Insert rows using the shared DB API and understand driver-specific insert behavior. - [Update](/docs/go/db/mutations/update): Update existing rows using the shared DB API across supported drivers. - [Boolean Rules](/docs/go/form/rules/boolean-rules): Learn how to validate boolean fields in NLG Form using true, false, equality, and custom error code validation rules. - [Compare Rules](/docs/go/form/rules/compare-rules): Learn how to compare fields in NLG Form using equality, inequality, greater-than, less-than, and cross-field validation rules. - [Float64 Rules](/docs/go/form/rules/float-rules): Learn how to validate float64 fields in NLG Form using minimum, maximum, range, equality, and custom validation rules for decimal values. - [Format Rules](/docs/go/form/rules/format-rules): Learn how to validate common string formats in NLG Form, including URLs, IP addresses, UUIDs, JSON strings, and IANA timezones. - [Generic Rules](/docs/go/form/rules/generic-rules): Learn how to validate generic comparable values in NLG Form using reusable allowed-value rules for strings, integers, booleans, enums, statuses, plans, and custom validation codes. - [Validation Rules](/docs/go/form/rules): Learn how validation rules work in NLG Form using reusable, composable, type-safe rule pipelines for strings, numbers, booleans, slices, formats, and cross-field validation. - [Integer Rules](/docs/go/form/rules/integer-rules): Learn how to validate integer fields in NLG Form using minimum, maximum, range, equality, positivity, negativity, and custom validation rules. - [Required Rules](/docs/go/form/rules/required-rules): Learn how required validation works in NLG Form, how empty values are handled, and why required rules change validation behavior for optional and zero-value fields. - [Slice Rules](/docs/go/form/rules/slices-rules): Learn how to validate slice and array fields in NLG Form using length validation, emptiness checks, containment rules, uniqueness validation, and custom error codes. - [String Rules](/docs/go/form/rules/string-rules): Learn how to validate string fields in NLG Form using required checks, length validation, prefixes, suffixes, substrings, equality rules, and custom validation codes. - [Time Rules](/docs/go/form/rules/time-rules): Learn how to validate time.Time fields in NLG Form using before, after, range, equality, zero-value, and custom validation rules. - [Low-Level Transactions](/docs/go/db/transactions/low-level-transactions): Use SQL transactions with prepared db.Query values and low-level execution helpers. - [Scylla Batches](/docs/go/db/transactions/scylla-batches): Use Scylla batches for grouped CQL writes through the Scylla driver. - [Scylla Lightweight Transactions](/docs/go/db/transactions/scylla-lightweight-transactions): Use Scylla lightweight transactions for conditional writes with IF NOT EXISTS and applied result checks. - [SQL Transactions](/docs/go/db/transactions/sql-transactions): Use SQL transactions with MySQL and PostgreSQL through the shared DB transaction API. - [Automatic Cleanup](/docs/go/logger/file-rotation/automatic-cleanup): The logger automatically removes old rotated log files to prevent uncontrolled disk usage. - [Automatic Log Directory](/docs/go/logger/file-rotation/automatic-log-directory): The logger automatically creates the configured log directory during initialization. - [Daily Log Naming](/docs/go/logger/file-rotation/daily-log-naming): The logger uses date-based file naming to organize log output by day and rotation sequence. - [File Rotation](/docs/go/logger/file-rotation/file-rotation): The logger supports automatic file rotation based on both date and file size. - [Graceful Shutdown](/docs/go/logger/file-rotation/graceful-shutdown): The logger returns a `Closer` instance during initialization to ensure that file handles and internal resources are released properly when the application exits. - [Structured JSON Logging](/docs/go/logger/json-logging/structured-json-logging): The logger writes structured log entries as JSON, making logs easy to parse, search, and process in production environments. - [Configuration](/docs/go/logger/getting-started/configuration): The logger is configured using the `Config` struct. - [Installation](/docs/go/logger/getting-started/installation): Install the logger package into your Go project. - [Quick Start](/docs/go/logger/getting-started/quick-start): undefined - [Optimized File Writer](/docs/go/logger/performance/optimized-file-writer): The logger includes an optimized file writer designed for high-throughput structured logging. - [Thread Safe Design](/docs/go/logger/performance/thread-safe-design): The logger is designed for concurrent use and can be safely shared across goroutines. - [Architecture](/docs/go/router/advanced/architecture): Understand how the router is structured internally, including route matching, middleware execution, context pooling, method matching, and standard library compatibility. - [Graceful Shutdown](/docs/go/router/advanced/graceful-shutdown): Gracefully stop HTTP servers, finish active requests, and safely release resources during application shutdown. - [Performance](/docs/go/router/advanced/performance): High-performance radix-tree routing with zero-allocation matching, optimized middleware execution, and low-overhead request handling. - [Request Lifecycle](/docs/go/router/advanced/request-lifecycle): Understand how an HTTP request moves through the router, from route matching and middleware execution to handler response and context cleanup. - [Colorized Terminal Output](/docs/go/logger/terminal-output/colorized-terminal-output): undefined - [Custom Notice Level](/docs/go/logger/terminal-output/custom-notice-level): The logger includes a custom `LevelNotice` log level designed for important operational messages that should remain highly visible in terminal output. - [Separate Log Levels](/docs/go/logger/terminal-output/separate-log-levels): The logger supports independent log levels for file output and terminal output. - [Context Logging](/docs/go/logger/structured-logging/context-logging): The logger supports context-aware logging through the standard `context.Context` integration provided by `log/slog`. - [Source Tracking](/docs/go/logger/structured-logging/source-tracking): The logger can include source file and line information in log entries. - [Standard Compatible](/docs/go/logger/structured-logging/standard-compatible): undefined - [Structured Chaining](/docs/go/logger/structured-logging/structured-chaining): The logger supports reusable structured loggers through `logger.With(...)` and the standard `slog` attribute system. - [Examples](/docs/go/logger/project/examples): Practical examples are available in the official examples repository - [Project Information](/docs/go/logger/project/info): Documentation links, performance characteristics, versioning policy, contribution guidelines, licensing, and project resources for the NLG Logger package. - [Group Middleware](/docs/go/router/core-concepts/group-middleware): Apply middleware only to selected route groups such as protected APIs, admin panels, or internal services. - [Middleware](/docs/go/router/core-concepts/middleware): Use built-in and custom middleware for logging, request IDs, real client IP detection, CORS, compression, content validation, caching, and request normalization. - [Mounting Standard Handlers](/docs/go/router/core-concepts/mounting-standard-handlers): Mount native net/http handlers, third-party services, and wildcard routes directly into the router without using router.Context. - [Parameterized Routes](/docs/go/router/core-concepts/parameterized-routes): Use route parameters, prepared pattern matchers, and custom regex constraints to validate URL segments before requests reach handlers. - [Request Context](/docs/go/router/core-concepts/request-context): Store request-scoped values, access route parameters, and share data safely between middleware and handlers using router.Context. - [Route Groups](/docs/go/router/core-concepts/route-groups): Organize related routes under shared URL prefixes for APIs, versioning, admin panels, and modular applications. - [Route Handlers](/docs/go/router/core-concepts/route-handlers): Register HTTP route handlers using generic method registration, REST-style shortcuts, and standard HTTP methods. - [Wildcard Routes](/docs/go/router/core-concepts/wildcard): Capture and forward dynamic URL branches using wildcard routes for static files, frontend applications, mounted services, and catch-all handlers. - [Installation](/docs/go/router/getting-started/installation): Install the router package into your Go project. - [Getting Started](/docs/go/router/getting-started/quick-start): Learn how to create your first HTTP server with the NLG Router package using static routes, parameterized routes, and middleware-ready handlers. - [Custom 404 Handler](/docs/go/router/features/custom-error-handler): Override the default 404 response with a custom handler for inline HTML, localized messages, JSON responses, or lightweight fallback pages. - [Custom 404 Page](/docs/go/router/features/custom-error-page): Replace the default 404 response with a custom HTML page, branded layout, or application-specific fallback content. - [Error Handling](/docs/go/router/features/error-handling): Handle startup errors, runtime failures, and panic logging using structured slog-compatible logging with automatic JSON file output. - [Health Checks](/docs/go/router/features/health-checks): Add liveness and readiness endpoints to expose service health for containers, load balancers, and orchestration platforms. - [Logging](/docs/go/router/features/logging): Configure router request logging for local development and production using Go slog and the NLG Logger package. - [Multi-Server Support](/docs/go/router/features/multi-server): Run multiple HTTP listeners simultaneously using a single router instance for internal APIs, public endpoints, admin panels, or multi-port deployments. - [Panic Recovery](/docs/go/router/features/panic-recovery): Handle panics from route handlers safely using a custom recovery handler and fail-safe internal recovery. - [Profiling](/docs/go/router/features/profiling): Enable Go pprof profiling endpoints for runtime performance analysis, memory inspection, and debugging. - [Rate Limiting](/docs/go/router/features/rate-limiting): Protect routes from excessive traffic using IP and route-based request throttling middleware. - [Static Files](/docs/go/router/features/static-files): Serve CSS, JavaScript, images, and favicon files from a local directory using a URL prefix. - [Installation](/docs/go/mapper/getting-started/installation): Install the mapper package into your Go project. - [Quick Start](/docs/go/mapper/getting-started/quick-start): Scan database rows into a typed Go slice. - [Examples](/docs/go/mapper/project/examples): Practical mapper examples are available in the official examples repository. - [Project Information](/docs/go/mapper/project/info): Documentation links, design goals, performance characteristics, versioning policy, contribution guidelines, licensing, and project resources for the NLG Mapper package. - [Cache](/docs/go/mapper/API/cache): API reference for named scan-plan caching and repeated struct scanning. - [Converters](/docs/go/mapper/API/converters): API reference for converting dynamic row values into common Go types. - [Errors](/docs/go/mapper/API/errors): API reference for mapper errors and recommended error handling patterns. - [Maps and Rows](/docs/go/mapper/API/maps-and-rows): API reference for scanning rows into maps, filling structs from maps, and using typed row helpers. - [Scanning](/docs/go/mapper/API/scanning): Scan database rows into Go structs using ScanStructRows, ScanStructSlice, and ScanStructOne. - [FillFromMap](/docs/go/mapper/real-usage/fill-from-map): Use FillFromMap to fill a Go struct from an existing map. - [ScanMapRows](/docs/go/mapper/real-usage/scan-map-rows): Use ScanMapRows to process database rows as dynamic map values. - [ScanStructOne](/docs/go/mapper/real-usage/scan-struct-one): Use ScanStructOne when a query is expected to return exactly one database row. - [ScanStructRows](/docs/go/mapper/real-usage/scan-struct-rows): Use ScanStructRows to process database rows one by one with a callback. - [ScanStructSlice](/docs/go/mapper/real-usage/scan-struct-slice): Use ScanStructSlice to load database rows into a typed Go slice. - [Examples](/docs/go/router/project/examples): Practical examples for common routing, middleware, server, and observability workflows - [Project Information](/docs/go/router/project/info): Documentation links, versioning policy, contribution guidelines, licensing, and project resources for the NLG Router package. - [GetDialect](/docs/go/db/querying/dialect-sql/get): Use db.GetDialect to read zero or one row using driver-specific SQL selected from db.DialectSQL. - [ListDialect](/docs/go/db/querying/dialect-sql/list): Use db.ListDialect to read multiple rows using driver-specific SQL selected from db.DialectSQL. - [MapsDialect](/docs/go/db/querying/dialect-sql/maps): Use db.MapsDialect to read dynamic map rows using driver-specific SQL selected from db.DialectSQL. - [Dialect SQL Overview](/docs/go/db/querying/dialect-sql/overview): Learn how to use db.DialectSQL with driver-specific SQL and shared query helpers. - [ValueDialect](/docs/go/db/querying/dialect-sql/value): Use db.ValueDialect to read a single scalar value using driver-specific SQL selected from db.DialectSQL. - [GetQuery](/docs/go/db/querying/query-objects/get): Use db.GetQuery to read zero or one database row from a prepared db.Query value. - [ListQuery](/docs/go/db/querying/query-objects/list): Use db.ListQuery to read multiple database rows from a prepared db.Query value. - [MapsQuery](/docs/go/db/querying/query-objects/maps): Use db.MapsQuery to read database rows as dynamic map values from a prepared db.Query. - [Query Objects Overview](/docs/go/db/querying/query-objects/overview): Learn how to use db.Query values with ListQuery, GetQuery, ValueQuery, and MapsQuery. - [ValueQuery](/docs/go/db/querying/query-objects/value): Use db.ValueQuery to read a single scalar value from a prepared db.Query value. - [Get](/docs/go/db/querying/select/get): Use db.Get to read zero or one database row into a typed Go value. - [List](/docs/go/db/querying/select/list): Use db.List to read multiple database rows into a typed Go slice. - [Maps](/docs/go/db/querying/select/maps): Use db.Maps to read database rows as dynamic map values. - [Select Overview](/docs/go/db/querying/select/overview): Learn the high-level select helpers for reading lists, single rows, scalar values, and map results. - [Value](/docs/go/db/querying/select/value): Use db.Value to read a single scalar value from a database query.