Skip to content

v0.1.0 - First release

Latest
Compare
Choose a tag to compare
@crazywolf132 crazywolf132 released this 22 Nov 08:53

A complete string formatting library that brings Rust's elegant formatting to Go,
with additional powerful features and robust implementation.

Core Features:

  • Rust-like {} placeholder syntax
  • Named and positional arguments
  • Format specifiers (width, alignment, precision)
  • ANSI color support
  • Conditional formatting
  • Nested field access
  • Format string caching
  • Escaped braces support ({{}} -> {})
  • Custom formatters and verbs
  • Struct tag support
  • Time formatting support
  • Environment variable expansion

Technical Implementation:

  • Thread-safe caching with size limits
  • Comprehensive error handling
  • Panic recovery with Safe() function
  • Efficient string building
  • Unicode support
  • Extensive test coverage
  • Performance benchmarks

Project Structure:

  • Modular code organization
  • GitHub Actions CI/CD
  • GoReleaser configuration
  • Linter setup
  • Complete documentation
  • Contributing guidelines
  • Security policy
  • Code of conduct

Performance:

  • Format string caching
  • Minimal allocations
  • Optimized parsing
  • Efficient string building
  • Comparable to fmt.Sprintf

Documentation:

  • Comprehensive README
  • Format specification guide
  • API documentation
  • Usage examples
  • Benchmarks

Testing:

  • Unit tests
  • Edge cases
  • Concurrency tests
  • Benchmark tests
  • Example tests

This implementation provides a complete, production-ready string formatting
library that combines the best of Rust's formatting with Go's simplicity.