Go API Documentation

github.com/go-task/task/v3/internal/templater

No package summary is available.

Package

Files: 2. Third party imports: 5. Imports from organisation: 2. Tests: 0. Benchmarks: 0.

Vars

Types

Cache

Cache is a help struct that allow us to call "replaceX" funcs multiple times, without having to check for error each time. The first error that happen will be assigned to r.err, and consecutive calls to funcs will just return the zero value.

Field name Field type Comment
Vars

*ast.Vars

No comment on field.
cacheMap

map[string]any

No comment on field.
err

error

No comment on field.

Functions

func IsSH

Deprecated: now always returns true

func Replace

func ReplaceGlobs

Uses: ast.Glob.

func ReplaceVar

func ReplaceVarWithExtra

Uses: ast.Var.

func ReplaceVars

func ReplaceVarsWithExtra

Uses: ast.NewVars.

func ReplaceWithExtra

Uses: bytes.Buffer, deepcopy.TraverseStringsFunc, maps.Clone, maps.Copy, strings.ReplaceAll, template.New.

func ResolveRef

Uses: fmt.Sprintf, template.New.

func (*Cache) Err

func (*Cache) ResetCache

Private functions

func arch

References: runtime.GOARCH.

func catLines

References: strings.ReplaceAll.

func exeExt

References: runtime.GOOS.

func fromYaml

func init

References: filepath.FromSlash, filepath.Join, filepath.Rel, filepath.ToSlash, maps.Copy, runtime.NumCPU, spew.Sdump, sprig.TxtFuncMap, template.FuncMap, uuid.New.

func merge

References: maps.Copy.

func mustFromYaml

func mustToYaml

func os

References: runtime.GOOS.

func shellQuote

References: syntax.LangBash, syntax.Quote.

func splitArgs

References: shell.Fields.

func splitLines

References: strings.ReplaceAll, strings.Split.

func toYaml