template

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(path string) (string, error)

Get returns the content of an embedded template file. path is relative to the files/ directory, e.g. "query/cpp/new-query.tmpl".

func Render

func Render(tmplContent string, data any) (string, error)

Render executes a template string with [[ ]] delimiters and the given data. [[ ]] delimiters are used to avoid conflicts with GitHub Actions {{ }} syntax.

func WriteFile

func WriteFile(tmplContent, dst string, data any, overwrite bool) error

WriteFile renders a template string and writes the output to dst. If overwrite is false and dst already exists, the write is skipped.

Types

type BundleInitOptions added in v0.1.1

type BundleInitOptions struct {
	Languages []string
	Branch    string
	// Packs is the list of pack names from qlt.conf.json with Bundle: true.
	// They are passed to github/codeql-action/init via its `config.packs` input.
	Packs []string
}

BundleInitOptions holds template variables for bundle init.

type TestInitOptions added in v0.1.1

type TestInitOptions struct {
	Language   string // display name used in the workflow title and filename
	LangFlag   string // value for --language flag; empty means test all languages
	Branch     string
	NumThreads int
	UseRunner  string
	CodeqlArgs string
}

TestInitOptions holds template variables for the test init workflow.

Jump to

Keyboard shortcuts

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