terraform/command/format
Kristin Laemmert fac60ab124
Add formatting for attributes with nested types (#28069)
* format/diff: extract attributes-writing logic to a function

This is a stepping-stone commit (for easier reviewability, and to prove that tests did not change) as part of writing a NestedType-specific diff printer.

* command/format: add support for formatting attributes with NestedTypes

This commit adds custom formatting for NestedType attributes. THe logic was mostly copied from the block diff printer, with minor tweaks here and there. I used the (excellent) existing test coverage and added a NestedType attribute to every test.

Since the (nested-block specific) test schemas were nearly identical, I added a function that returns the schema with the requested NestingMode.
2021-03-15 09:31:23 -04:00
..
diagnostic.go cli: Add comprehensive JSON diagnostic structure 2021-03-12 13:12:37 -05:00
diagnostic_test.go command: no visual warning hierarchy in -no-color 2021-01-27 09:26:53 -08:00
diff.go Add formatting for attributes with nested types (#28069) 2021-03-15 09:31:23 -04:00
diff_test.go Add formatting for attributes with nested types (#28069) 2021-03-15 09:31:23 -04:00
format.go command/format: a package for formatting plans/state for output 2017-01-26 14:33:49 -08:00
object_id.go command: Reinstate object ids in the UIHook progress logs 2018-10-16 19:14:11 -07:00
object_id_test.go Updates after running `make fmt` with Go v1.11.1 2018-10-17 14:11:08 -07:00
state.go Merge pull request #27081 from hashicorp/jbardin/staticcheck 2020-12-02 15:43:10 -05:00
state_test.go Mildwonkey/providers interface renaming (#27805) 2021-02-18 10:13:43 -05:00
trivia.go command/format: Don't try to fill the last terminal column 2021-01-13 15:37:04 -08:00