format

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 8 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 CheckMultilineBegin added in v1.6.0

func CheckMultilineBegin(s string) bool

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