tfdiags

package
v0.51.2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MPL-2.0, MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCtyPath

func FormatCtyPath(path cty.Path) string

FormatCtyPath is a helper function to produce a user-friendly string representation of a cty.Path. The result uses a syntax similar to the HCL expression language in the hope of it being familiar to users.

func FormatError

func FormatError(err error) string

FormatError is a helper function to produce a user-friendly string representation of certain special error types that we might want to include in diagnostic messages.

This currently has special behavior only for cty.PathError, where a non-empty path is rendered in a HCL-like syntax as context.

func FormatErrorPrefixed

func FormatErrorPrefixed(err error, prefix string) string

FormatErrorPrefixed is like FormatError except that it presents any path information after the given prefix string, which is assumed to contain an HCL syntax representation of the value that errors are relative to.

Types

This section is empty.

Jump to

Keyboard shortcuts

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