function

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Arch

func Arch() function.Function

Arch returns a function that produces the CPU architecture name, such as "amd64" or "arm64".

func EndsWith

func EndsWith() function.Function

EndsWith returns a function that checks whether a string ends with the given suffix.

func Env

func Env() function.Function

Env returns a function that reads an environment variable by name, returning an empty string when the variable is not set. An optional second argument provides a fallback value used instead of the empty string.

func OS

func OS() function.Function

OS returns a function that produces the operating system name, such as "linux", "darwin", or "windows".

func Registry

func Registry(workingDir string) map[string]function.Function

Registry returns the complete function table for use in HCL expression evaluation. The workingDir parameter scopes filesystem functions to the caller's effective directory.

func StartsWith

func StartsWith() function.Function

StartsWith returns a function that checks whether a string begins with the given prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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