Roadmap to Sprout v1.0
The roadmap to grow the sprout
Key Objectives
✅ Minimize Dependencies - DONE
Reduce the number of external dependencies to mitigate frequent update cycles, making Sprout more stable and lightweight.
Dependencies have been minimized and optimized across all registries.
✅ Enhanced Documentation - DONE
Provide comprehensive, easy-to-understand documentation that covers all functionalities, use cases, and examples to improve the developer experience.
These features are implemented on v0.5.0, documentations can be found here:
You are on the official documentation site 🎉
✅ Conventional Function Naming - DONE
Establish clear, consistent naming conventions for functions to enhance code readability and maintainability. Unlike Sprig, where function naming varies between camelCase, and snake_case, and similar functions lack consistent prefixing, Sprout will introduce a standardized approach to function naming. This will make the library more intuitive and reduce the learning curve for new users.
This convention are defined and available here:
✅ Reduce memory fingerprint - DONE
Aim to minimize memory allocations as much as possible to alleviate the burden on the garbage collector in large-scale applications. By optimizing the way memory is used within the framework, we ensure that Sprout is not only efficient in its functionality but also in its resource consumption. This approach contributes to overall better performance and scalability of applications using Sprout.
✅ Native Error Handling - DONE
Follow default Go template error handling mechanisms for all functions to ensure that errors are managed gracefully and efficiently.
These features are implemented on v0.6.0, documentation can be found here:
✅ Expanded Function Set - DONE
Add a broader array of functions without imposing limitations, enabling users to accomplish more tasks directly within the framework.
✅ Customizable Function Loading - DONE
Allow users to customize which functions to load into their runtime environment, preventing unnecessary resource consumption and enhancing performance.
These features are implemented on v0.5.0, documentations can be found here:
✅ Function Aliasing - DONE
Enable the creation of aliases for functions outside the library, providing flexibility and convenience in how functions are accessed and utilized.
These features are implemented on v0.3.0, documentation can be found here :
✅ Function Notices - DONE
When you are a middle-app (between sprout and the user how write the template), you need to be careful when you upgrade a template library due to potential breaking changes or deprecated functions. The solution are to embed a notice system in the template library to warn the end-user of a deprecation and let x versions between the deprecation notice and the replacement / removal of the function.
These features are implemented on v0.6.0, documentation can be found here : https://github.com/go-sprout/sprout/blob/main/docs/broken-reference/README.md
Compatibility between spring and sprout
✅ All functions present on sprig v3.2.3 are available without breaking changes on sprout v1. Only deprecation warning due to following convention are present.
This page will be updated each time function are re-implemented correctly in Sprout v1
Functions added to Sprout v1
A list of functions wanted for v1 based on issues, pull requests from sprig, feedback on sprout. All functions listed here will be implemented for the v1.
toYAML
Convert a struct to a YAML String
fromYAML
Convert YAML String to a struct
toBool
Convert any to a boolean
toDuration
Convert any to a time.Duration
default
,empty
,coalesce
Don't trigger default go value as false
dig
Dig into a map without crashes in format book.author.name
sha512sum
Support of SHA512
md5sum
Support of md5 hash
hasField
Detect if a field are present in an object using reflect. Source
toDuration
convert a value to a time.Duration
toCamelCase
, toPascalCase
, toKebakCase
, toDotCase
, topathCase
, toConstantCase
,toSnakeCase
,toTitleCase
A batch of functions to change casing of a string to aby casing you want.
capitalize
, uncapitalize
Capitalize / Uncapitalize a string (Upper/lower only the first character)
flatten
Flatten nested list be one level
regexpFindSubmatch
, regexpAllSubmatches
,regexpFindNamedSubmatch
, regexpAllNamedSubmatches
Collection of function to found and retrieve submatches and named submatches
cidr
, ip
, mac
A collection of functions for network ip manipulation
toLocalDate
Convert to a time.Time
with a timezone support
Last updated