template

package
v0.0.0-...-8eb9c3d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Directory = "templates"

Variables

This section is empty.

Functions

func FilesInDir

func FilesInDir(path []string) (res []string, err error)

ReadFilesInDir reads a list of paths and reads all yaml file inside. It returns a slice of strings with the raw content of the yaml

func FindPossibleTemplatesDir

func FindPossibleTemplatesDir(root string) (res []string)

FindPossibleTemplatesDir returns templates dir located at root

func ReadFiles

func ReadFiles(s ...string) (res []string)

ReadFiles reads all the given files and returns a slice of []*chart.File containing the raw content and the file name for each file

func Render

func Render(strings []string, values, d map[string]interface{}) (string, error)

Render renders the template string like helm

func RenderWithValues

func RenderWithValues(rawFiles []string, valuesFile string, defaultFile ...string) (string, error)

RenderWithValues render a group of files with values files

func String

func String(t string, i interface{}) (string, error)

String templates a string with the interface

func UnMarshalValues

func UnMarshalValues(values []string) (templatedata, error)

UnMarshalValues unmarshal values files and joins them into a unique templatedata the join happens from right to left, so any rightmost value file overwrites the content of the ones before it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL