info

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package info provides functions useful to create types like info.Range

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixRange

func FixRange(rootdir string, old info.Range) info.Range

FixRange fix the given range. This is necessary since on tests we don't know the sandbox project path, so host absolute paths must be updated here.

func FixRangesOnConfig

func FixRangesOnConfig(dir string, cfg hcl.Config)

FixRangesOnConfig fix the ranges on the given HCL config. This is necessary since on tests we don't know the sandbox project path, so host absolute paths must be updated here.

func Range

func Range(fname string, start, end hhcl.Pos) info.Range

Range builds a info.Range for testing purposes. On tests we don't know the rootdir at test definition, so no rootdir is required. The returned range, if set on an hcl.Config will have to be fixed with FixRangesOnConfig before being compared to actual results.

Types

This section is empty.

Jump to

Keyboard shortcuts

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