Help us shape the future of Go! Take the 2026 Go Developer Survey

format

package
v0.9.10 Latest Latest
Warning

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

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

Documentation

Overview

Package format contains helpers for formatting various Terraform structures for human-readabout output.

This package is used by the official Terraform CLI in formatting any output and is exported to encourage non-official frontends to mimic the output formatting as much as possible so that text formats of Terraform structures have a consistent look and feel.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Plan

func Plan(opts *PlanOpts) string

Plan takes a plan and returns a

func State

func State(opts *StateOpts) string

State takes a state and returns a string

Types

type PlanOpts

type PlanOpts struct {
	// Plan is the plan to format. This is required.
	Plan *terraform.Plan

	// Color is the colorizer. This is optional.
	Color *colorstring.Colorize

	// ModuleDepth is the depth of the modules to expand. By default this
	// is zero which will not expand modules at all.
	ModuleDepth int
}

PlanOpts are the options for formatting a plan.

type StateOpts

type StateOpts struct {
	// State is the state to format. This is required.
	State *terraform.State

	// Color is the colorizer. This is optional.
	Color *colorstring.Colorize

	// ModuleDepth is the depth of the modules to expand. By default this
	// is zero which will not expand modules at all.
	ModuleDepth int
}

StateOpts are the options for formatting a state.

Jump to

Keyboard shortcuts

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