summaryrefslogtreecommitdiff
path: root/internal/errors/errors.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-06-19 21:53:28 +0300
committerPaul Buetow <paul@buetow.org>2025-06-19 21:53:28 +0300
commit7ff8beef11fa664d5d07c8701935553046640b99 (patch)
treea43b271b2b64275854e558a651c2d357f081c486 /internal/errors/errors.go
parent978437895ef202bf3fc2703b01e5583e12e2a174 (diff)
Add comprehensive documentation across DTail codebase
Documented all major Go packages and command-line tools with comprehensive comments explaining functionality, architecture, and usage patterns. Major documentation additions: - All cmd/ binaries with detailed package descriptions and main function docs - Core internal packages: config, protocol, clients, server, mapr, discovery - File system operations, error handling, and version management - Complete API documentation for all public interfaces - Architecture insights and component relationships Benefits: - Improved developer onboarding and maintainability - Clear understanding of distributed architecture - Proper Go documentation format for godoc compatibility - Enhanced troubleshooting through error categorization - Comprehensive API reference for all client types 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'internal/errors/errors.go')
-rw-r--r--internal/errors/errors.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/errors/errors.go b/internal/errors/errors.go
index bb53efd..3fa3e67 100644
--- a/internal/errors/errors.go
+++ b/internal/errors/errors.go
@@ -1,3 +1,25 @@
+// Package errors provides comprehensive error handling utilities for DTail.
+// It defines sentinel errors for common error conditions, error wrapping
+// functions for adding context, and multi-error support for operations
+// that can encounter multiple failures.
+//
+// Key features:
+// - Predefined sentinel errors for common DTail error conditions
+// - Error wrapping with context for better debugging
+// - Multi-error support for batch operations
+// - Standard error interface compatibility
+// - Error type checking and unwrapping utilities
+//
+// Error categories:
+// - Connection: Network and SSH connection errors
+// - Authentication: Permission and credential errors
+// - Configuration: Config parsing and validation errors
+// - File/IO: File system access and operation errors
+// - Protocol: Communication protocol errors
+// - Resource: Resource exhaustion and timeout errors
+//
+// This package enables consistent error handling across the DTail codebase
+// and provides clear error categorization for troubleshooting.
package errors
import (