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.

βœ… Enhanced Documentation - DONE

Provide comprehensive, easy-to-understand documentation that covers all functionalities, use cases, and examples to improve the developer experience.

βœ… 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.

βœ… 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.

βŒ›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.

βŒ›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.

βœ… 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.

βœ… 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.

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

Function
Sprig v3.2.3
Spout 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.

DONE
Functions
Description

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

#24: reflect safe functions feature and new signatures

Change request updated