sorter

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sort

func Sort(file *hclwrite.File, options SortOptions) (*hclwrite.File, error)

Sort parses the input file, sorts it according to options, and returns a new sorted file object. If no changes are made, the original file object might be returned (or a new identical one).

func SortListValuesInBody added in v0.1.1

func SortListValuesInBody(body *hclwrite.Body)

SortListValuesInBody recursively finds and sorts simple lists within a body. This function is intended to be called from the main Sort function.

Types

type SortOptions

type SortOptions struct {
	SortBlocks   bool
	SortTypeName bool
	SortList     bool
}

SortOptions defines the sorting behavior.

Jump to

Keyboard shortcuts

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