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.
This feature 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 writed to available here: Templating Conventions
β
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 - IN PROGRESS
Introduce built-in error handling mechanisms for all functions to ensure that errors are managed gracefully and efficiently.
An RFC is currently open for feedback and discussion. You can view and participate in the RFC here.
βAdvanced Error Handling Strategy - DISCONTINUED
Implement a custom error handling framework utilising channels for improved error reporting and handling on the Go side, reducing the risk of template crashes.
This feature has been discontinued due to its complexity, which benefits less than 1% of users. If truly necessary, a custom handler can be implemented to achieve the same functionality.
βExpanded Function Set - IN PROGRESS
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.
This feature are implemented on v0.5.0, documentations can be found here:
β
Function Aliasing - DONE
Enable the creation of aliases for functions outside of the library, providing flexibility and convenience in how functions are accessed and utilized.
This feature 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.
This feature are implemented on v0.6.0, documentation can be found here :
Compatibility between spring and sprout
A compatibility table between sprig v3.2.3 and sprout v1.0
hello
β
β
ago
β
β
date
β
β
date_modify
β οΈ DEPRECATED
βοΈ
dateModify
β
β
date_in_zone
β οΈ DEPRECATED
βοΈ
dateInZone
β
β
duration
β
β
durationRound
β
β
htmlDate
β
β
htmlDateInZone
β
β
must_date_modify
β οΈ DEPRECATED
βοΈ
mustDateModify
β
β
mustToDate
β
β
now
β
β
toDate
β
β
unixEpoch
β
β
abbrev
β
βοΈ (ellipsis)
ellipsis
βοΈ
β
abbrevboth
β
βοΈ (ellipsisBoth)
ellipsisBoth
βοΈ
β
trunc
β
β
trim
β
β
upper
β
β
lower
β
β
title
β
β
untitle
β
β
substr
β
β
repeat
β
β
trimall
β οΈ DEPRECATED
βοΈ (trimAll)
trimAll
β
β
trimSuffix
β
β
trimPrefix
β
β
nospace
β
β
initials
β
β
randAlphaNum
β
β
randAlpha
β
β
randAscii
β
β
randNumeric
β
β
swapcase
β
β
shuffle
β
β
snakecase
β
β
camelcase
β
β
kebabcase
β
β
wrap
β
β
wrapWith
β
β
contains
β
β
hasPrefix
β
β
hasSuffix
β
β
quote
β
β
squote
β
β
cat
β
π€·ββοΈ TBD
indent
β
β
nindent
β
β
replace
β
β
plural
β
β
sha1sum
β
β
sha256sum
β
β
adler32sum
β
β
toString
β
β
atoi
β
βοΈ (toInt)
int64
β
βοΈ (toInt64)
int
β
βοΈ (toInt)
float64
β
βοΈ (toFloat64)
seq
β
β
toDecimal
β
π€·ββοΈ TBD
gt
β
π€·ββοΈ TBD
gte
β
π€·ββοΈ TBD
lt
β
π€·ββοΈ TBD
lte
β
π€·ββοΈ TBD
split
β
β
splitList
β
β
splitn
β
β
toStrings
β
π€·ββοΈ TBD
until
β
β
untilStep
β
β
add1
β
β
add
β
β
sub
β
β
div
β
β
mod
β
β
mul
β
β
randInt
β
β
add1f
β
βοΈ (add1)
addf
β
βοΈ (add)
subf
β
βοΈ (sub)
divf
β
βοΈ (div)
mulf
β
βοΈ (mul)
biggest
β
βοΈ (max)
max
β
β
min
β
β
maxf
β
βοΈ (max)
minf
β
βοΈ (min)
ceil
β
β
floor
β
β
round
β
β
join
β
β
sortAlpha
β
β
default
β
β
empty
β
β
coalesce
β
β
all
β
β
any
β
β
compact
β
β
mustCompact
β
β
fromJson
β
β
toJson
β
β
toPrettyJson
β
β
toRawJson
β
β
mustFromJson
β
β
mustToJson
β
β
mustToPrettyJson
β
β
mustToRawJson
β
β
ternary
β
β
deepCopy
β
β
mustDeepCopy
β
β
typeOf
β
β
typeIs
β
β
typeIsLike
β
β
kindOf
β
β
kindIs
β
β
deepEqual
β
β
env
β
β
expandenv
β
β
getHostByName
β
π€·ββοΈ TBD
base
β
β
dir
β
β
clean
β
β
ext
β
β
isAbs
β
β
osBase
β
β
osClean
β
β
osDir
β
β
osExt
β
β
osIsAbs
β
β
b64enc
β
β
b64dec
β
β
b63enc
β
β
b63dec
β
β
tuple
β
β
list
β
β
dict
β
β
get
β
β
set
β
β
unset
β
β
hasKey
β
β
pluck
β
β
keys
β
β
pick
β
β
omit
β
β
merge
β
β
mergeOverwrite
β
β
mustMerge
β
β
mustMergeOverwrite
β
β
values
β
β
append
β
β
push
β
β
mustAppend
β
β
mustPush
β
β
prepend
β
β
mustPrepend
β
β
first
β
β
mustFirst
β
β
rest
β
β
mustRest
β
β
last
β
β
mustLast
β
β
initial
β
β
mustInitial
β
β
reverse
β
β
mustReverse
β
β
uniq
β
β
mustUniq
β
β
without
β
β
mustWithout
β
β
has
β
β
mustHas
β
β
slice
β
β
mustSlice
β
β
concat
β
β
dig
β
β
chunk
β
β
mustChunk
β
β
bcrypt
β
β
htpasswd
β
β
genPrivateKey
β
π€·ββοΈ TBD
derivePassword
β
π€·ββοΈ TBD
buildCustomCert
β
π€·ββοΈ TBD
genCA
β
π€·ββοΈ TBD
genCAWithKey
β
π€·ββοΈ TBD
genSelfSignedCert
β
π€·ββοΈ TBD
genSelfSignedCertWithKey
β
π€·ββοΈ TBD
genSignedCert
β
π€·ββοΈ TBD
genSignedCertWithKey
β
π€·ββοΈ TBD
encryptAES
β
π€·ββοΈ TBD
decryptAES
β
π€·ββοΈ TBD
randBytes
β
β
uuidv4
β
β
semver
β
π€·ββοΈ TBD
semverCompare
β
π€·ββοΈ TBD
fail
β
π€·ββοΈ TBD
regexMatch
β
β
mustRegexMatch
β
β
regexFindAll
β
β
mustRegexFindAll
β
β
regexFind
β
β
mustRegexFind
β
β
regexReplaceAll
β
β
mustRegexReplaceAll
β
β
regexReplaceAllLiteral
β
β
mustRegexReplaceAllLiteral
β
β
regexSplit
β
β
mustRegexSplit
β
β
regexQuoteMeta
β
β
urlParse
β
β
urlJoin
β
β
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
flatten
Flatten nested list be one level
toBool
Convert any to a boolean
toDuration
Convert any to a time.Duration
default
,empty
,coalesce
Dont trigger default go value as false
toLocalDate
Convert to a time.Time
with a timezone support
dig
Dig into a map without crashes in format book.author.name
cidrhost
,cidrnetmask
,cidrsubnet
,cidrsubnets
A collection of functions for network ip manipulation
include
,required
Manipulation of template logic, implemented by helm team
randSeed
Allow to set the seed of the on a rand pipeline
regexpFindSubmatch
, regexpAllSubmatches
,regexpFindNamedSubmatch
, regexpAllNamedSubmatches
Collection of function to found and retrieve submatches and named submatches
sha512sum
Support of SHA512
hasField
Detect if a field are present in an object using reflect. Source
Last updated