format

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package format contains functionality to render a cft.Template into YAML or JSON

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrettyPrint added in v1.3.0

func PrettyPrint(i interface{}) string

converts struct to a JSON formatted string

func String

func String(t cft.Template, opt Options) string

String returns a string representation of the supplied cft.Template

Types

type Options

type Options struct {
	// JSON determines whether the outputs will be JSON (true) or YAML (false)
	JSON bool

	// Unsorted will cause the formatter to leave the ordering of template elements
	// as in the original template if true.
	// If false, the formatter will rearrange the template elements into
	// canonical order.
	Unsorted bool
}

Options contains options for formatting cfn templates

Jump to

Keyboard shortcuts

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