Roadmap to Sprout v1.0

The roadmap to grow the sprout

Key Objectives

All objectives are get from feedback, suggestions and personal knowledge. You can discuss about the v1.0 directly in the issue on GitHub.

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:

Loader System (Registry)

How to create a registry

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 Aliases

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

Implemented - The implementation will be available through v1

To rework - This function are present but aren't reworked with Sprout vision

⚠️ Deprecated - This function are deprecated and not be migrated to sprout

✖️ Will not be implemented - This function will not be migrated to sprout v1

Dont exist - This function don't exist on this version

🤷‍♂️ TBD : To Be Determinate for v1


This page will be updated each time function are re-implemented correctly in Sprout v1

FunctionSprig v3.2.3Spout v1.0 (to define)

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.

DONEFunctionsDescription

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

Change request #24: reflect safe functions feature and new signatures