Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Releases: andeya/gust

v1.20.7

31 Dec 18:33

Choose a tag to compare

Changelog

Added

New Packages

  • shutdown: Graceful shutdown and reboot utility package

    • Provides graceful shutdown and reboot functionality for Go applications
    • Handles system signals (SIGINT, SIGTERM, SIGUSR2)
    • Supports configurable timeout and hooks for cleanup
    • Cross-platform support (Unix/Linux and Windows)
    • Context-based shutdown control
  • shutdown/inheritnet: Network listener inheritance for graceful restarts

    • Provides Listen functions that support inheriting connections from parent process
    • Compatible with systemd socket activation (LISTEN_FDS)
    • Enables zero-downtime deployments with connection preservation
    • A practical application example of the shutdown package
  • coarsetime: Fast, coarse-grained time access

    • Faster alternative to time.Now() with configurable precision
    • Inspired by Linux's CLOCK_REALTIME_COARSE and CLOCK_MONOTONIC_COARSE
    • Provides both wall clock time and monotonic time
    • Default 100ms precision with customizable frequency

New Functions

  • conv.SystemEndian(): Returns the byte order of the current system

    • Detects system endianness at startup
    • Returns binary.LittleEndian or binary.BigEndian
  • conv.EnsurePointerInitialized(): Initializes nil pointers recursively

    • Traverses pointer chains and interfaces
    • Initializes nil pointers with zero values
    • Returns result.VoidResult for error handling
  • syncutil.AtomicValue[T]: Generic wrapper for atomic.Value

    • Type-safe atomic load and store operations
    • Returns Option[T] from Load for nil-safety
    • Supports Store, Swap, and CompareAndSwap operations

Changed

  • shutdown: Enhanced shutdown and reboot logic with context support
    • Updated shutdown and reboot methods to accept context parameters
    • Improved logging functionality with context in log messages
    • Refactored internal methods to separate logic from exit handling
    • Better testability without terminating processes

Improved

  • Test Coverage: Simplified and enhanced tests across packages
    • Reduced test code volume by ~58% while maintaining >95% coverage
    • Improved test structure and reduced redundancy
    • Added comprehensive tests for new features

v1.20.6

31 Dec 04:28

Choose a tag to compare

Changelog

Added

New Package: gust/fileutil

  • File Operations (fileutil/file.go):

    • FileExists / FileExist - Check file/directory existence
    • SearchFile - Search for files in multiple paths
    • GrepFile - Search for lines matching a pattern in a file
    • FilepathSplitExt - Split file path into base and extension
    • FilepathStem - Extract file stem (name without extension)
    • FilepathSlashInsensitive - Normalize path separators
    • FilepathContains - Check if basepath contains all subpaths
    • FilepathAbsolute / FilepathAbsoluteMap - Convert paths to absolute paths
    • FilepathRelative / FilepathRelativeMap - Convert paths to relative paths
    • FilepathDistinct - Remove duplicate paths
    • FilepathSame - Check if two paths refer to the same file
    • MkdirAll - Create directory with parent directories
    • WriteFile - Write data to file with automatic directory creation
    • RewriteFile / RewriteToFile - Rewrite file content with callback
    • ReplaceFile - Replace file content in specified range
    • CopyFile - Copy a single file
    • CopyDir - Copy directory recursively
    • All functions return result.Result[T] or result.VoidResult for type-safe error handling
    • All functions use the Catch pattern (defer r.Catch()) for elegant error handling
  • Archive Operations (fileutil/archive.go):

    • TarGz - Create tar.gz archive from directory
    • TarGzTo - Create tar.gz archive with ignore patterns support
    • Both functions return result.VoidResult and use Catch pattern
  • Comprehensive Test Coverage:

    • fileutil/file_test.go - 939 lines of comprehensive tests
    • fileutil/archive_test.go - 461 lines of comprehensive tests
    • 100% test coverage for all fileutil functions

Enhanced Examples

  • examples/result_test.go - Completely rewritten with Before/After comparisons:

    • ExampleResult_catchPattern - Demonstrates Catch pattern for API call chains
    • ExampleResult_fileIO - Shows Catch pattern for file operations
    • ExampleResult_validationChain - Demonstrates chaining validations with Catch pattern
    • ExampleResult_iteratorIntegration - Shows Result with Iterator for data processing
    • All examples include traditional Go code vs gust code comparisons
  • examples/real_world_test.go - Completely rewritten:

    • Example_realWorld_dataProcessing - Iterator + Result for data pipelines
    • Example_realWorld_batchFileOperations - Iterator + Catch for batch operations
    • Example_realWorld_dataTransformation - Complex data transformation with Iterator
    • Example_realWorld_fileSystemOperations - File system operations with Catch pattern
    • Example_realWorld_dataValidation - Data validation pipeline with Iterator + Result
    • Example_realWorld_apiCallChain - API call chain with Catch pattern
  • examples/iterator_test.go - Enhanced with comparison examples:

    • ExampleIterator_dataAggregation - Data aggregation with Iterator
    • ExampleIterator_complexFiltering - Complex filtering and transformation
    • All examples include Before/After comparisons showing 70% code reduction
  • examples/option_test.go - Enhanced with comparison examples:

    • ExampleOption_nilSafety - Demonstrates how Option eliminates nil pointer panics
    • ExampleOption_chaining - Chaining Option operations elegantly
    • ExampleOption_safeDivision - Safe handling of division by zero
    • ExampleOption_configManagement - Configuration management with Option
    • ExampleOption_mapLookup - Safe map lookups with Option
  • examples/examples_test.go - Updated to reflect new example structure

Changed

Documentation Overhaul

  • README.md - Completely rewritten (379 lines changed):

    • Added "The Catch Pattern: gust's Secret Weapon" section highlighting result.Ret + Unwrap + Catch pattern
    • Enhanced Quick Start with Catch pattern example
    • Added comprehensive Before/After comparisons for all examples
    • Quantified benefits: 70% less code (from 15+ lines to 8 lines)
    • Updated all real-world examples to showcase Catch pattern
    • Enhanced Result section with Catch pattern details
    • Added file system operations example using Catch pattern
    • All examples now demonstrate the power of Catch pattern
  • README_ZH.md - Completely rewritten (411 lines changed):

    • Fully synchronized with English README
    • Added "Catch 模式:gust 的秘密武器" section
    • All examples and comparisons match English version
    • Complete Chinese translation of all new content

Core Enhancements

  • internal/core/result.go:

    • Enhanced Catch() method documentation
    • Improved error handling in Catch pattern
  • internal/core/option.go:

    • Minor improvements to Option implementation
  • result/result.go:

    • Added FmtErrVoid function for formatted error creation
    • Enhanced Result helper functions
  • internal/core/result_test.go:

    • Added comprehensive tests for Catch pattern
    • Enhanced test coverage for FmtErrVoid
  • result/result_test.go:

    • Added tests for FmtErrVoid

Statistics

  • 17 files changed
  • 3,235 insertions(+), 398 deletions(-)
  • Net addition: 2,837 lines

Highlights

  1. New fileutil Package: Complete file system utilities with 100% test coverage
  2. Catch Pattern Documentation: Comprehensive documentation of the revolutionary Catch pattern
  3. Enhanced Examples: All examples now include Before/After comparisons
  4. 70% Code Reduction: Quantified benefits shown in all examples
  5. Type-Safe Error Handling: All new functions use Result[T] and Catch pattern

Migration Guide

If you're upgrading from v1.20.5:

  1. New fileutil Package:

    • Import github.com/andeya/gust/fileutil for file operations
    • All functions return result.Result[T] or result.VoidResult
    • Use Catch pattern: defer r.Catch() for automatic error handling
  2. Catch Pattern:

    • Learn the new result.Ret + Unwrap + Catch pattern
    • Replace if err != nil checks with defer r.Catch()
    • See README.md for comprehensive examples
  3. Examples:

    • Review updated examples in examples/ directory
    • All examples now include Before/After comparisons
    • Study the Catch pattern examples for best practices

Full Changelog: v1.20.5...v1.20.6

v1.20.5

30 Dec 19:01

Choose a tag to compare

Improved conv/string.go

v1.20.4

30 Dec 17:07

Choose a tag to compare

Add conv/string.go. This file contains string manipulation utilities including text formatting, case conversion, encoding conversion, and JSON marshaling.

Full Changelog: v1.20.3...v1.20.4

v1.20.3

30 Dec 14:37

Choose a tag to compare

Changelog

🎉 New Features

✨ New Package: gust/encrypt - Comprehensive Cryptographic Functions

A complete cryptographic functions package with Rust-inspired error handling.

Hash Functions:

  • MD5: MD5(data []byte, encoding Encoding) result.Result[string]
  • SHA Series:
    • SHA1, SHA224, SHA256, SHA384, SHA512
    • SHA512_224, SHA512_256
  • FNV Series (32/64/128-bit):
    • FNV-1a: FNV1a32, FNV1a64, FNV1a128
    • FNV-1: FNV1_32, FNV1_64, FNV1_128
  • CRC Series: CRC32, CRC64
  • Adler-32: Adler32

AES Encryption/Decryption:

  • Three modes supported: ModeECB, ModeCBC, ModeCTR
  • Supports AES-128/192/256 (16/24/32 byte keys)
  • Function signatures:
    • EncryptAES(key, plaintext []byte, mode Mode, encoding Encoding) result.Result[[]byte]
    • DecryptAES(key, ciphertext []byte, mode Mode, encoding Encoding) result.Result[[]byte]

Encoding Formats:

  • EncodingHex: Hexadecimal encoding (default, most common)
  • EncodingBase64: Base64URL encoding (more compact, URL-safe)

Features:

  • All functions return result.Result[T] for chainable operations
  • Complete unit test coverage
  • Comprehensive documentation and examples

Examples:

// Hash operations
hash := encrypt.SHA256([]byte("hello"), encrypt.EncodingHex)
if hash.IsOk() {
    fmt.Println(hash.Unwrap())
}

// AES encryption (chainable operations)
result := encrypt.EncryptAES(key, plaintext, encrypt.ModeCBC, encrypt.EncodingBase64).
    Map(func(ciphertext []byte) []byte {
        return ciphertext
    })

🔧 Enhanced Features

📦 gust/conv - Reflection Utilities Enhancement

Enhanced reflection utility functions with new practical functions and improved test coverage.

New Functions:

  1. IsExportedOrBuiltinType(t reflect.Type) bool

    • Checks if a type is exported or a built-in type
    • Automatically dereferences pointer types
  2. IsExportedName(name string) bool

    • Checks if a name is exported (starts with uppercase letter)

Enhanced Test Coverage:

  • Added tests for multi-level pointer and interface dereferencing in DerefValue and DerefInterfaceValue
  • Added comprehensive tests for new exported type checking functions
  • Improved existing function tests to cover more edge cases

Improved Functions:

  • DerefValue: Supports multi-level pointer and interface dereferencing
  • DerefInterfaceValue: Supports nested interface dereferencing
  • IsCompositionMethod: Improved composition method detection logic

📝 Documentation Updates

README Documentation Improvements

Clarified usage of Unwrap and UnwrapOr methods:

  • UnwrapOr: Safely extract values (with default, never panics)
  • Unwrap: Extract value (⚠️ panics if error - use only after IsOk() check, prefer UnwrapOr for safety)

Added clear usage warnings and best practice recommendations in README to prevent panics from improper Unwrap usage.

Updated Package List:

  • Added gust/encrypt package to "Additional Packages" section
  • Updated package descriptions and key features list

📊 Statistics

  • 3 commits
  • 8 files changed
  • 1 contributor

📦 Files Changed

New Files:

  • encrypt/encrypt.go - Cryptographic and hash functions implementation
  • encrypt/encrypt_test.go - Complete unit tests
  • errutil/stack_internal_test.go - Stack trace formatting tests

Modified Files:

  • conv/reflect.go - New reflection utility functions
  • conv/reflect_test.go - Enhanced test coverage
  • README.md - Documentation updates
  • README_ZH.md - Chinese documentation updates
  • errutil/errbox_test.go - Enhanced error handling tests

Full Changelog: v1.20.2...v1.20.3

v1.20.2

29 Dec 16:07

Choose a tag to compare

Simplify ErrBox

Full Changelog: v1.20.1...v1.20.2

v1.20.1

29 Dec 14:55

Choose a tag to compare

  • Add random package
  • Add bitset package

v1.20.0 (⚠️ Breaking Changes 🔄 Major Layout Refactoring)

28 Dec 12:13

Choose a tag to compare

Changelog

🔄 Changed - Major Layout Refactoring

This release includes a comprehensive layout refactoring across the entire project. The codebase has been reorganized from a flat structure to a modular, package-based layout for better organization, maintainability, and scalability.

Package Reorganization

Iterator Package (iter/iterator/)

The iterator package has been completely restructured from a monolithic approach to a functional-module-based layout:

  • Renamed: iter/iterator/ for clearer package naming

  • Removed monolithic files: adapters.go, adapters_extended.go, iterator_methods.go, double_ended_methods.go, try_methods.go, special_iterators.go, sum_product.go, unzip.go

  • New modular structure: Organized into 12 functional modules:

    • core.go - Core interfaces and double-ended iterator methods
    • constructors.go - Iterator creation functions
    • basic.go - Basic transformation operations (Map, FilterMap, Chain, Zip, Enumerate, FlatMap)
    • filtering.go - Filtering operations (Skip, Take, StepBy, SkipWhile, TakeWhile)
    • transforming.go - Advanced transformations (MapWhile, Scan, Flatten)
    • chunking.go - Chunking operations (MapWindows, ArrayChunks, ChunkBy)
    • utility.go - Utility operations (Fuse, Inspect, Intersperse, Cycle, Peekable, Cloned)
    • consumers.go - Terminal operations (Collect, Count, Last, Partition, AdvanceBy, Nth, NextChunk, Sum, Product, Unzip, TryReduce, TryForEach)
    • fold_reduce.go - Folding and reduction operations (Fold, Reduce, ForEach, TryFold, Rfold, TryRfold)
    • find_search.go - Search operations (Find, FindMap, Position, All, Any, TryFind, Rfind)
    • min_max.go - Min/max operations
    • comparison.go - Comparison utilities
  • Test files: Each module now has a corresponding *_test.go file, improving test discoverability

Other Package Reorganizations

  • Value Conversion: valconv/conv/ (cleaner naming)
  • Option: opt/option/ (full word for clarity)
  • Result: ret/result/ (full word for clarity)
  • Constraints: digit.go, ordering.goconstraints/ (grouped related utilities)
  • Error Utilities: errbox.go, stack.goerrutil/ (grouped error utilities)
  • Sync Utilities: sync.gosyncutil/ (expanded to multiple files: atomic.go, lazy.go, map.go, mutex.go)
  • Core Types: option.go, result.go, utils.gointernal/core/ (moved to internal package)
  • New Packages: Added pair/ and void/ packages

Key Improvements:

  • Modular Architecture: Transformed from flat/monolithic structure to functional modules
  • Self-Contained Modules: Each module includes its own implementation (_Impl) and iterable structs (_Iterable), reducing dependencies
  • Consistent Naming: Package names use full words for clarity (option instead of opt, result instead of ret)
  • Better Organization: Related functionality grouped into dedicated packages
  • Improved Test Structure: Tests co-located with their corresponding source files
  • Internal Separation: Core implementation moved to internal/ package

Impact:

  • 113 files changed across the refactoring
  • 7 commits dedicated to layout improvements:
    • refactor layout
    • refactor layout 2
    • refactor iterator layout
    • style: fix ci, examples and readme
    • CI and build configuration updates
  • Zero breaking changes: All public APIs remain unchanged - this is purely an internal layout restructuring

📝 Documentation

  • Updated README.md and README_ZH.md to reflect the new modular layout
  • Added comprehensive code organization documentation
  • Updated examples and documentation to reference the new structure

🔧 Build & CI

  • Updated Go version requirement to 1.24.0
  • Updated CI configuration to use GODEBUG for type alias support
  • Enabled type alias support in Makefile and CI configuration
  • Fixed CI, examples, and README formatting

⚠️ Breaking Changes

None - This is a layout refactoring-only release. All public APIs remain unchanged. The changes are internal to the package structure and are transparent to users of the library.

🔍 Migration Guide

No migration needed! All public APIs remain the same. The refactoring is purely internal and transparent to users of the library.

Note for Contributors: If you have local forks or branches that reference the old package structure, you may need to update import paths, but standard usage through the public API remains unchanged.


Full Changelog: v1.12.0...v1.20.0

v1.12.0

27 Dec 11:24

Choose a tag to compare

Changelog

Added

Error Handling

  • panicError type: New error type that wraps errors with their panic stack traces for enhanced debugging
    • Implements error, fmt.Formatter, and StackTraceCarrier interfaces
    • Error() method returns only the error message (without stack trace)
    • Format() method supports %v, %+v, %s, %+s verbs for controlled stack trace display
    • Unwrap() method for error chain traversal
    • StackTrace() method to access the panic stack trace
    • newPanicError() helper function to create panicError instances

Stack Trace Support

  • stack.go package: New comprehensive stack trace capture and formatting utilities
    • GetStackTrace() function to capture current stack trace
    • PanicStackTrace() function to capture panic stack trace
    • Frame type representing a single stack frame with methods: pc(), file(), line(), name(), Format(), MarshalText()
    • StackTrace type representing a sequence of frames with Format() method
    • StackTraceCarrier interface for types that carry stack trace information
    • Full support for fmt.Formatter interface with %v, %+v, %s, %+s, %d, %n verbs

Result Type Enhancements

  • OkVoid() function: Convenience function to create Ok[Void](nil)
    • Replaces the previous NonResult() function for better naming consistency
  • ErrVoid() function: Convenience function to create Err[Void](err)
  • Catch() method enhancement: Now supports optional stack trace capture
    • Catch() - Captures stack trace by default (backward compatible)
    • Catch(true) - Explicitly enables stack trace capture
    • Catch(false) - Disables stack trace capture for better performance
    • When stack trace is enabled, panics are wrapped in panicError with full stack information
    • When stack trace is disabled, panics are directly wrapped in ErrBox without stack trace overhead

Iterator Enhancements

  • BitSet Iterator Support: New iterator adapters for bit set operations
    • BitSetLike interface: Generic interface for bit set implementations
      • Size() method returns the number of bits
      • Get(offset int) bool method returns bit value at specified offset
    • FromBitSet(bitset BitSetLike): Creates iterator over all bits, yielding Pair[int, bool] (offset, value)
    • FromBitSetOnes(bitset BitSetLike): Creates iterator over only set bits (value = true), yielding int (offset)
    • FromBitSetZeros(bitset BitSetLike): Creates iterator over only unset bits (value = false), yielding int (offset)
    • FromBitSetBytes(bytes []byte): Creates iterator over all bits in a byte slice, yielding Pair[int, bool] (offset, value)
    • FromBitSetBytesOnes(bytes []byte): Creates iterator over only set bits in byte slice, yielding int (offset)
    • FromBitSetBytesZeros(bytes []byte): Creates iterator over only unset bits in byte slice, yielding int (offset)
    • All BitSet iterators support full iterator method chaining (Filter, Map, Fold, Collect, etc.)

Documentation

  • README.md updates:
    • Added "Iterator Constructors" section showcasing FromSlice, FromElements, FromRange, FromFunc, Empty, Once, Repeat
    • Added "BitSet Iterators" section with comprehensive examples
    • Reorganized "Available Methods" section for better clarity
    • Added examples demonstrating BitSet iterator chaining operations
  • README_ZH.md updates: Synchronized with English README, including all new features and examples

Changed

Error Handling

  • ErrBox.As() method: Optimized implementation
    • Introduced errorInterfaceType as package-level constant to avoid repeated reflection calls
    • Simplified isErrorTarget calculation
    • Added direct AssignableTo check for better performance
    • Improved error handling for non-error target types
    • Enhanced documentation for edge cases

Result Type

  • Catch() method signature: Changed from Catch() to Catch(withStackTrace ...bool)
    • Maintains backward compatibility (default behavior unchanged)
    • Allows optional stack trace capture control
    • Better performance when stack traces are not needed

Naming Consistency

  • Renamed NonResult() to OkVoid(): Better alignment with Ok[T]() and RetVoid() naming conventions

Fixed

Error Handling

  • ErrBox.As() panic prevention: Fixed potential panic when target type is not an interface or does not implement the error interface
    • Added proper type checking before calling errors.As
    • Ensures errors.As is only called when target implements error interface
    • Improved handling of wrapped errors and error chains

Stack Trace Formatting

  • StackTrace.Format() default case: Added default case to handle unsupported format verbs gracefully
    • Ensures %d and %n verbs are correctly passed to Frame.Format()
    • Maintains consistency with Frame.Format() behavior

Testing

New Test Coverage

  • errbox_test.go: Comprehensive tests for panicError type

    • TestPanicError_Error: Tests error message formatting
    • TestPanicError_Unwrap: Tests error unwrapping
    • TestPanicError_StackTrace: Tests stack trace access
    • TestPanicError_StackTraceCarrier: Verifies interface implementation
    • TestNewPanicError: Tests creation with various input types
    • TestPanicError_Format_AllVerbs: Tests all fmt.Formatter verbs
    • TestPanicError_Format_EmptyStack: Tests formatting with empty stack
    • TestPanicError_Unwrap_Chain: Tests error chain unwrapping
    • Enhanced TestErrBox_As with additional test cases for error chain traversal and edge cases
  • stack_test.go: Comprehensive tests for stack trace functionality

    • TestGetStackTrace: Tests stack trace capture
    • TestPanicStackTrace: Tests panic stack trace capture
    • TestFrame_*: Tests for Frame methods (pc, file, line, name, Format, MarshalText)
    • TestStackTrace_*: Tests for StackTrace methods (Format, formatSlice)
    • TestStack_*: Tests for stack type methods
    • Edge case tests for zero frames, nil stacks, empty stacks
  • result_test.go: Enhanced tests for Catch() method

    • TestResult_Catch_WithStackTraceFalse: Verifies Catch(false) behavior
    • TestResult_Catch_WithStackTraceTrue: Verifies Catch(true) behavior
    • TestResult_Catch_WithStackTraceDefault: Verifies default Catch() behavior
    • TestResult_Catch_FormatOptions: Tests all format verbs for panicError
    • TestResult_Catch_NoPanic: Tests Catch when no panic occurs
    • TestResult_Catch_MultiplePanics: Tests multiple panic scenarios
    • TestResult_Catch_ErrorChain: Tests error chain preservation
    • TestOkVoid: Tests OkVoid() function
    • TestErrVoid: Tests ErrVoid() function
    • Enhanced existing tests to verify stack trace behavior
  • iter/iterator_test.go: Comprehensive tests for BitSet iterators

    • TestFromBitSet: Tests FromBitSet with custom BitSetLike implementation
    • TestFromBitSetOnes and TestFromBitSetZeros: Tests filtered iterators
    • TestFromBitSetBytes: Tests byte slice iterator
    • TestFromBitSetBytesOnes and TestFromBitSetBytesZeros: Tests byte slice filtered iterators
    • TestBitSetIteratorChaining and TestBytesIteratorChaining: Tests iterator method chaining

Test Improvements

  • Updated test assertions to verify stack trace behavior correctly
  • Added t.Logf statements to demonstrate format verb differences
  • Improved test coverage for edge cases and error scenarios

Documentation

  • Updated code comments to remove outdated references to Errable, ToErrable, NonErrable
  • Enhanced function documentation with detailed examples
  • Added comprehensive examples for new features in README
  • Improved inline documentation for error handling and stack trace usage

v1.11.0

27 Dec 09:56

Choose a tag to compare

Changelog

Added

  • Added test cases for Compare function with additional numeric types (uintptr, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32)
  • Added test cases for ErrBox.As method:
    • TestInnerErrBox_As_ErrorDirectMatch: Tests direct error type matching
    • TestInnerErrBox_As_ErrorChain: Tests error chain traversal
    • TestInnerErrBox_As_NonMatchingType: Tests non-matching target types
    • TestInnerErrBox_As_NilTargetPanic: Tests nil target panic behavior
  • Added support for innerErrBox type in BoxErr function (now handles innerErrBox values directly in switch statement)

Changed

  • BREAKING: Removed ToErrBox function, replaced with BoxErr for consistency
  • BREAKING: Removed Errable interface and related functions (ToErrable, NonErrable)
  • Optimized innerErrBox.As method algorithm:
    • Extracted errorInterfaceType as package-level constant to avoid repeated reflection calls
    • Simplified logic for checking if target type implements error interface
    • Reduced unnecessary reflection calls by using reflect.TypeOf directly
    • Improved performance by checking error type assignment before using errors.As
    • Fixed panic when target type is not error interface by checking isErrorTarget before calling errors.As
  • Updated BoxErr to handle innerErrBox type directly in switch statement
  • Improved error handling consistency across the codebase

Fixed

  • Fixed TestInnerErrBox_As_WithUnwrap test failure - now correctly matches wrapped error types
  • Fixed TestInnerErrBox_As_UnwrapNil test failure - now correctly handles non-error types
  • Fixed panic issue in innerErrBox.As when target type is not error interface (e.g., *int)
  • Fixed outdated comments referencing removed ToErrable and NonErrable functions:
    • Updated iter/iterator_methods.go AdvanceBy example
    • Updated iter/double_ended_methods.go AdvanceBackBy documentation
  • Updated documentation comments to use correct API (IsOk(), IsErr() instead of deprecated functions)

Removed

  • Removed coverage_fixes_test.go test file (test cases moved to appropriate test files)
  • Removed errable.go and errable_test.go files (functionality replaced by ErrBox)

Documentation

  • Optimized README documentation for better clarity
  • Updated code comments to reflect current API
  • Removed references to deprecated ToErrable() method in Option.ToResult() documentation
  • Updated iterator method documentation examples to use correct API (IsOk(), IsErr())

Testing

  • Renamed TestOption_ToErrable to TestOption_ToResult for clarity (tests ToResult() method)
  • Renamed TestResult_Errable to TestResult_ErrToVoidResult for better description
  • Enhanced BoxErr tests with innerErrBox type handling test case
  • Improved test coverage for error handling paths, especially ErrBox.As method

Full Changelog: v1.10.0...v1.11.0