converter

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConverted = func(file *hcl.File) (model.Document, int, error) {
	c := converter{bytes: file.Bytes}
	body, err := c.convertBody(file.Body.(*hclsyntax.Body))

	if err != nil {
		sentry.CaptureException(err)
		if er, ok := err.(*hcl.Diagnostic); ok && er.Subject != nil {
			return nil, er.Subject.Start.Line, err
		}

		return nil, 0, err
	}

	return body, 0, nil
}

DefaultConverted an hcl File to a toJson serializable object This assumes that the body is a hclsyntax.Body

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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