From 7ff8beef11fa664d5d07c8701935553046640b99 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 19 Jun 2025 21:53:28 +0300 Subject: Add comprehensive documentation across DTail codebase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- internal/errors/errors.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'internal/errors/errors.go') 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 ( -- cgit v1.2.3