terraform/command/format
Martin Atkins e918fa83ec command/format: Don't panic when item removed from list of objects
Due to these tests happening in the wrong order, removing an object from
the end of a sequence of objects would previously cause a bounds-check
panic.

Rather than a more severe rework of the logic here, for now we'll just
introduce an extra precondition to prevent the panic. The code that
follows already handles the case where there _is_ no new object (i.e. the
"old" object is being deleted) as long as we're able to pass through this
type-checking logic.

The new "JSON list of objects - removing item" test covers this problem
by rendering a diff for an object being removed from the end of a list
of objects within a JSON value.
2019-03-19 15:46:40 -07:00
..
diagnostic.go command/format: Fix rendering of attribute-agnostic diagnostics 2018-11-26 23:38:37 +00:00
diff.go command/format: Don't panic when item removed from list of objects 2019-03-19 15:46:40 -07:00
diff_test.go command/format: Don't panic when item removed from list of objects 2019-03-19 15:46:40 -07: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
plan.go backend/local: Render CBD replacement (+/-) correctly (#19642) 2018-12-14 13:45:47 +00:00
state.go command/format: fix an issue where data resources were not displaying (#20386) 2019-02-19 14:18:47 -08:00
state_test.go command/format: fix an issue where data resources were not displaying (#20386) 2019-02-19 14:18:47 -08:00