resolver

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package resolver provides templating for baur configuration files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoTemplate

type GoTemplate struct {
	// contains filtered or unexported fields
}

GoTemplate parses template strings and executes the template statements.

func NewGoTemplate

func NewGoTemplate(appName, root string, gitCommitFn func() (string, error)) *GoTemplate

NewGoTemplate returns a GoTemplate instance. The .AppName and .Root variables are initialized with appName and root. gitCommitFn is the function that is called via {{ gitCommit }} in a template.

func (*GoTemplate) Resolve

func (s *GoTemplate) Resolve(in string) (string, error)

Resolve parses the parameter "in" as Go template, executes it and returns the result.

Jump to

Keyboard shortcuts

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