Skip to content

[feature] Add Sprig to the template processor #16

@lhriley

Description

@lhriley

There may be underlying reasons why this wasn't included at some point, but seeing as the Sprig library is pretty well maintained, it would make sense to include it with the kube-gen template processor.

https://github.com/Masterminds/sprig

I think it only requires adding the following here

import (
:

import (
  "github.com/Masterminds/sprig/v3"
  "html/template"
)

and merging these functions here

var Funcs = template.FuncMap{
:

tpl := template.Must(
  template.New("base").Funcs(sprig.FuncMap()).ParseGlob("*.html")
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions