Releases: fupengl/promise
Releases · fupengl/promise
v1.1.8
v1.1.7
Full Changelog: v1.1.6...v1.1.7
v1.1.6
Full Changelog: v1.1.2...v1.1.6
🎉 Go Promise Library v1.1.2 - Initial Release
We're excited to announce the first stable release of the Go Promise Library! This library brings the power and elegance of JavaScript Promises to Go, with high performance and type safety.
🚀 What's New in v1.0.0
✨ Core Features
- High-Performance Promise Implementation: Built on microtask queue architecture for optimal performance
 - Full Go Generics Support: Type-safe Promise operations with compile-time checking
 - Built-in Safety Features: Automatic panic recovery and error propagation
 - Zero Dependencies: Pure Go implementation, no external packages required
 
🔧 Advanced Capabilities
- Promise Chaining: Fluent API with Then, Catch, and Finally methods
 - Concurrency Control: All, Race, Any, and AllSettled for managing multiple Promises
 - Flexible Configuration: Global and custom Promise managers with independent settings
 - Resource Management: Automatic cleanup and resource isolation between managers
 
📊 Performance Highlights
- Ultra-fast Await: Only 14.07 nanoseconds per operation
 - Efficient Scheduling: 130.2 nanoseconds microtask scheduling
 - Memory Optimized: Just 448 bytes per Promise instance
 - High Throughput: Capable of handling 90 million operations per second
 
🎯 Use Cases
This library is perfect for:
- Async Operations: HTTP requests, database queries, file operations
 - Concurrent Processing: Managing multiple background tasks
 - Error Handling: Graceful error propagation and recovery
 - Resource Management: Controlled async resource allocation
 - API Development: Building robust, async-capable services
 
📚 Quick Start
package main
import (
    "fmt"
    "github.com/fupengl/promise"
)
func main() {
    // Create a Promise
    p := promise.New(func(resolve func(string), reject func(error)) {
        resolve("Hello, Promise!")
    })
    // Chain operations
    result := p.Then(func(value string) any {
        return value + " World!"
    }, nil)
    // Wait for result
    finalValue, _ := result.Await()
    fmt.Println(finalValue) // Output: Hello, Promise! World!
}🔗 Important Links
- 📖 Documentation: README.md
 - 🌏 中文文档: README_CN.md
 - 📚 API Reference: Go pkg.dev
 - 🐛 Issues: GitHub Issues
 - 💬 Discussions: GitHub Discussions
 
🧪 Testing & Quality
- ✅ Comprehensive test coverage
 - ✅ Performance benchmarks included
 - ✅ Example code and documentation
 - ✅ Go 1.21+ compatibility verified
 - ✅ Multi-platform testing
 
🚀 Getting Started
# Install the library
go get github.com/fupengl/promise
# Run tests
go test -v
# Run benchmarks
go test -bench=. -benchmem
# View examples
go test -v -run Example🤝 Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
Special thanks to:
- The Go community for inspiration and feedback
 - Contributors who helped shape this library
 - Users who provided valuable testing and feedback
 
⭐ If this library helps you, please give us a Star! ⭐
Happy coding with Go Promises! 🎉
Full Changelog: v1.1.1...v1.1.2