🌱 A New Era of Functionality, Flexibility, and Performance!
We’re thrilled to announce the v1.0.0-rc1 release of Sprout, marking a significant step forward in our mission to create the most powerful and flexible templating library for Go developers. This release introduces major features, critical fixes, and exciting new tools to help you build more efficient and secure templates.
This section's comparisons are based on Sprig v3.2.3. If you're totally new, welcome! Go ahead with Getting started
- Migration to Function Handler: All functions have been migrated under a unified function handler to streamline function management. Documentation.
- Registry System (Loader): Introduced a new registry system for modular function management, supporting easier extension and organization of functions. Documentation.
- Safe Functions: New safe versions of functions that follow Go's template standards, providing flexible error handling options. Documentation.
- Function Notices: Added real-time notices when specific functions are called to warn or inform users of critical behavior. Documentation.
- Function Aliases: Added function aliases to ensure smooth transition and backward compatibility. Documentation.
- Reimport Functions from Sprig: Maintained backward compatibility by reimporting core functions from Sprig. Documentation.
- Backward Compatibility Documentation: Updated docs to ensure seamless migration and backward compatibility. Documentation.
- Optimized Memory Footprint: Performance improvements were made to reduce memory usage across the board. Benchmarks.
- Fixed CamelCase Logic: Updated CamelCase and PascalCase transformation logic to handle edge cases better. Documentation
- Never more panics: Rework functions how cause panics on template engines to ensure a better stability. Documentation.
- Batch of New Functions: Introduced a wide range of functions for slices, regex manipulations, and conversions, expanding Sprout's toolkit significantly. See PR 70.
- Network Registry: New functions for handling IP, CIDR, and MAC address manipulations in templates. See PR 71.
- SHA512 Checksums: Added
sha512sum
to the checksum registry with useful notices for end-users. See PR 59. - New Struct Method
hasField
: Added a method for checking struct fields dynamically. See PR 61. - String Capitalization Functions: New string capitalization functions with full Unicode and Latin rune support. See PR 62.
toDuration
Conversion Function: A new utility to simplify time conversions across templates. See PR 27.
- Fancy and complete documentation: Create a fancy and complete documentation, ensuring they are up-to-date and aligned with Sprout’s growth. Documentation
A heartfelt thank you to everyone who contributed to this v1.0.0 journey, particularly @42atomys, whose tireless work and commitment have made this release possible. Special thanks to @mbezhanov, @andig, @ccoVeille for their valuable contributions and to @caarlos0 for the support in making decisions and for being the second maintainer of the Sprout organization.
This release candidate is a crucial step towards the official v1.0.0 release. We encourage you to test the new features, provide feedback, and help us fine-tune the final version. We’re incredibly excited for what’s to come and can’t wait to see how Sprout will evolve with your help!
Let’s continue growing Sprout together and make this library the best tool for Go developers everywhere!
💡 Cultivating Precision, One Function at a Time!
- Function Call Notices: Added notifications to inform or warn end-users when functions are called. See PR 58.
- Safe Functions Compliance: Aligned safe functions with Go template standards and Sprout conventions. See PR 65.
- SHA512 Checksum in Registry: Introduced
sha512sum
to the checksum registry, complete with informative notices. See PR 59. hasField
for Structs: A newhasField
method to check fields in structs is now available. See PR 61.- String Capitalization Functions: Added new functions to capitalize strings, fully supporting Unicode and Latin runes. See PR 62 and PR 63.
- Dropped v0.1 Error Handling: Removed legacy error handling until a safe/must decision is finalized in the RFC. See PR 52.
- Documentation Updates: Added function signatures to the conventions, making it easier to understand their usage. See PR 64.
- Unicode Capitalization Fix: Resolved issues with string capitalization involving Unicode and Latin runes. See PR 63.
- Release Candidate Fixes: Addressed problems with v0.6.0-rc.1 to ensure stability and performance. See PR 68.
Read more about notices on official documentation.
Read more about safe functions on official documentation.
💡 Cultivating Code, Growing Solutions!
- Memory Footprint Reduction: Reduced overall memory footprint for better performance. See (@42atomys) PR 56.
- Default Logger Initialization: Fixed an issue where the default logger had a bad initialization. See (@42atomys) PR 48.
- Logger Accessibility: Resolved a problem where loggers were not accessible due to duplicated pointers. See (@42atomys) PR 50.
- Sprigin CamelCase Consistency: Ensured that
sprigin
camelcase returns are consistent. See (@42atomys) PR 55.
- Go Task Integration: Replaced Makefile with Go Task for better task management. See (@42atomys) PR 54.
💡 Nurturing Ideas, Harvesting Innovation!
- Revamped Architecture: Introducing the powerful registry system (aka loader). This refactor modularizes all methods into separate registries. See (@42atomys) PR 46
- Handler & Registry Interfaces: New interfaces with clear rules to streamline function management.
- Seamless Migration: All functions are now in registries, with backward compatibility via
FuncsMap
inspringin
See Transitioning from Sprig.
Read more about the registry system in the official documentation.
- In-Depth Docs: Detailed documentation and a handy glossary are now available. Explore more sprout.atom.codes.
- README: Updated the documentation and README to reflect all recent changes. Check out the latest README.md.
toDuration
Doc Update: Added a practical example showing how to convert durations to seconds usingtoDuration
. This is based on real test cases to make time formatting easier. See (@cbandy) PR 44.
💡 Cultivating Innovation, One Sprig at a Time!
- Reducing YAML Dependencies Footprint: Improved project efficiency by reducing dependencies. See (@andig) PR 38.
- Timezone Leak Fix in
toDate
Method: Resolved an issue affecting date calculations. See (@42atomys) PR 42. - Backward Compatibility Documentation: Added documentation for ensuring seamless upgrades. See (@42atomys) PR 43.
💡 Cultivating code is something beautiful.
- Enhanced Conversions Group: New functions (
toBool
,toUint
,toUint64
) and comprehensive documentation have been added to the conversions group, broadening our library's functionality and making it more user-friendly. See (@42atomys) PR 33. - YAML Functions Unleashed: Implementing YAML functions (
fromYaml
,toYaml
.mustFromYaml
,mustToYaml
) inspired by Helm's robust toolset, we've extended our configuration management capabilities. See (@42atomys) PR 36.
- Merge Function Improvement: The merge function has been tweaked to preserve the zero value in destination structs, ensuring more predictable and accurate data handling. See (@42atomys) PR 34.
- String Transformation Logic Update: Corrected the logic for transforming strings to CamelCase and PascalCase to avoid previous inconsistencies and errors. See (@42atomys) PR 35.
💡 Sprouting New Possibilities in Every Release!
Important
The project has moved to a new GitHub home github.com/go-sprout/sprout !
- Unified Function Management: All functions are now neatly organized under the new FunctionHandler, streamlining how functionalities are handled within the library. This consolidation is crucial for enhancing library operations and future development. See (@42atomys) PR 14.
- Introducing
toDuration
Conversion: A new utility function,toDuration
, has been added to simplify time conversions across various formats, enhancing our toolkit's versatility. See (@42atomys) PR 27.
- Project's New Home: The project has moved to a new GitHub home, centralizing where updates and community interactions will take place. Visit us at: Sprout on GitHub.
- Community Files Update: All community-related files have been refreshed to better support our growing community of developers and contributors. See (@42atomys) PR 12.
💡 Cultivating Innovation, One Sprig at a Time!
- Creating the Root of the Sprout: Sprouts are now an evolution of Sprig with a standalone function handler. See (@42atomys) PR 2.
- Allowing Function Aliasing: Enables developers to use aliases for their templates. In Sprout, this feature is used for backward compatibility with Sprig. See (@42atomys) PR 3.
- Full documentation available here: https://docs.atom.codes/sprout/function-aliases
- Documentation Available: Documentation can be found at https://docs.atom.codes/sprout.
- README Refactor: The README has been updated to reflect the project's vision and its future. See (@42atomys) PR 4.
We are excited to announce the release of Sprout v0.1, a modern and evolved variant of the Masterminds/sprig library, specifically reimagined and redesigned for contemporary Go development environments. Our mission with Sprout is to reignite the innovation that made Sprig an indispensable tool for Go developers, providing a robust set of functions and helpers that enhance productivity and code clarity.
Our vision for Sprout is to not only match but exceed the functionality and reliability that made Sprig a cornerstone in many Go projects. We aim to bring Sprout into the modern Go ecosystem, ensuring compatibility with the latest versions of Go and introducing a stream of new features and improvements that reflect the needs and requests of the community. We recognize the importance of maintaining a vibrant and up-to-date toolset for developers and commit to an active development cycle for Sprout.
Sprout v0.1 is designed to align seamlessly with Sprig v3.2.3, providing a familiar yet enhanced experience for developers transitioning from Sprig.
Key features and enhancements include: Enhanced Compatibility: Sprout is fully compatible with modern Go versions, starting with Go 1.19 and above, addressing the compatibility issues faced by Sprig users in newer Go environments. New Functions and Improvements: We will introduce additional functions and enhancements to existing ones, carefully designed to increase productivity and simplify common coding tasks in Go. Performance Optimizations: Sprout includes significant performance improvements, making your applications faster and more efficient. Community-Driven Development: Sprout is committed to being a community-focused project, welcoming contributions, and suggestions from developers to shape the future of the library.
Looking ahead, Sprout will continue to evolve with the Go ecosystem. Our roadmap includes the integration of more features and utilities, drawing from the feedback and needs of our growing community of users. We aim to foster a vibrant ecosystem around Sprout, encouraging contributions, and collaboration to ensure that Sprout remains at the forefront of Go development tools.
To start using Sprout in your Go projects, please visit our GitHub repository at Sprout's GitHub Page. You'll find comprehensive documentation, installation instructions, and examples to help you get started.
We are thrilled to embark on this journey with you, the Go developer community, and look forward to seeing the incredible applications you will build with Sprout. Thank you for your support, and welcome to Sprout v0.1!