All Functions

All functions

Base go template functions

and call eq ge gt html index js le len lt ne not or print printf println urlquery

Data Conversion

DATA HCL JSON TFVARS YAML data fromDATA fromData fromHCL fromHcl fromJSON fromJson fromTFVARS fromTFVars fromYAML fromYaml hcl json tfvars toBash toHCL toHcl toIHCL toIHcl toInternalHCL toInternalHcl toJSON toJson toPrettyHCL toPrettyHcl toPrettyJSON toPrettyJson toPrettyTFVars toQuotedHCL toQuotedHcl toQuotedJSON toQuotedJson toQuotedTFVars toTFVars toYAML toYaml yaml

Data Manipulation

String append array bool char contains containsStrict content delete dict dictionary extract find findStrict get has hasKey hasStrict ifUndef initial intersect isEmpty isNil isNull isSet isZero key keys lenc list merge nbChars omit pick pickv pluck prepend push remove removeEmpty removeNil rest reverse safeIndex set slice string tuple undef union uniq unique unset values without

Git functions

currentBranch currentCommit origin

Logging

critical criticalf debug debugf error errorf fatal fatalf info infof notice noticef panic panicf trace tracef warn warnf warning warningf

Mathematic Bit Operations

band bclear bitwiseAND bitwiseClear bitwiseOR bitwiseXOR bor bxor leftShift lshift rightShift rshift

Mathematic Fundamental

add cbrt ceil dim div divide exp exp2 expm1 exponent exponent2 floor int int64 integer integer64 mod modf modulo mul multiply pow pow10 power power10 prod product quotient rem remainder roundDown roundUp rounddown roundup sub subtract sum trunc truncate

Mathematic Stats

average avg biggest max maximum min minimum smallest

Mathematic Trigonometry

acos acosh arcCosine arcCosinus arcHyperbolicCosine arcHyperbolicCosinus arcHyperbolicSine arcHyperbolicSinus arcHyperbolicTangent arcSine arcSinus arcTangent arcTangent2 asin asinh atan atan2 atanh cos cosh cosine cosinus deg degree firstBessel0 firstBessel1 firstBesselN hyperbolicCosine hyperbolicCosinus hyperbolicSine hyperbolicSinus hyperbolicTangent ilogb j0 j1 jn log log10 log1p log2 logb rad radian secondBessel0 secondBessel1 secondBesselN sin sincos sine sineCosine sinh sinus sinusCosinus tan tangent tanh y0 y1 yn

Mathematic Utilities

abs absolute dec decimal frexp gamma hex hexa hexaDecimal hypot hypotenuse isInf isInfinity isNaN ldexp lgamma nextAfter signBit sqrt squareRoot to until

Net

curl httpDoc httpDocument httpGet

Operating systems functions

currentDir currentUser diff difference exists expand fileExists fileMode fileSize fileStat glob group home homeDir homeFolder isDir isDirectory isExecutable isExist isFile isFolder isReadable isWriteable joinPath lastMod lastModification lastModificationTime look lookPath mode pwd save size stat type user userGroup username whereIs which write writeTo

Other utilities

aIndent aWrap aindent autoIndent autoWrap awrap center centered color colored colorln concat enhanced formatList id identifier iif indent joinLines lorem loremIpsum mergeList nIndent nindent printRaw raw rawList reCompile repeat sIndent sindent spaceIndent splitLines stripANSI stripColor stripansi striptcolor ternary wrap wrapped

Runtime

alias aliases allFunctions assert assertWarning assertion assertw attr attributes c categories completeExamples context current ellipsis eval exec execute exit func function functions getAttributes getMethods getSignature include localAlias methods raise raiseError run sign signature substitute templateNames templates userContext

Sprig Cryptographic & Security

adler32sum bcrypt buildCustomCert decryptAES derivePassword encryptAES genCA genCAWithKey genPrivateKey genSelfSignedCert genSelfSignedCertWithKey genSignedCert genSignedCertWithKey htpasswd randBytes sha1sum sha256sum

Sprig Date

ago date dateInZone dateModify date_in_zone date_modify duration durationRound htmlDate htmlDateInZone now toDate unixEpoch

Sprig Default

coalesce compact default empty fromJsonSprig ternarySprig toJsonSprig toPrettyJsonSprig toRawJson

Sprig Dictionary

deepCopy dictSprig dig getSprig hasKeySprig keysSprig listSprig mergeOverwrite mergeSprig omitSprig pickSprig pluckSprig setSprig tupleSprig unsetSprig valuesSprig

Sprig Encoding

b32dec b32enc b64dec b64enc

Sprig File Path

base clean dir ext isAbs osBase osClean osDir osExt osIsAbs

Sprig Flow Control

fail

Sprig General

GUID guid hello uuid uuidv4

Sprig List

all any appendSprig chunk concatSprig first hasSprig initialSprig last prependSprig pushSprig restSprig reverseSprig sliceSprig uniqSprig withoutSprig

Sprig Mathematics

add1 add1f addSprig addf biggestSprig ceilSprig divSprig divf floorSprig maxSprig maxf minSprig minf modSprig mulSprig mulf randInt round seq subSprig subf untilStep

Sprig Network functions

getHostByName

Sprig OS

env expandenv

Sprig Reflection

deepEqual kindIs kindOf kindis kindof typeIs typeIsLike typeOf typeis typeisLike typeof

Sprig Regex

regexFind regexFindAll regexMatch regexQuoteMeta regexReplaceAll regexReplaceAllLiteral regexSplit

Sprig String Slice

join sortAlpha split splitList splitn toStrings

Sprig Strings

abbrev abbrevboth camelcase cat containsSprig hasPrefix hasSuffix indentSprig initials kebabcase lower nindentSprig nospace plural quote randAlpha randAlphaNum randAscii randNumeric repeatSprig replace shuffle snakecase squote substr swapcase title toString trim trimAll trimPrefix trimSuffix trimall truncSprig untitle upper wrapSprig wrapWith

Sprig Type Conversion

atoi float64 intSprig toDecimal

Sprig URL functions

urlJoin urlParse

Sprig Version comparison

semver semverCompare