Updates and improvements to comments

This commit is contained in:
Pam Selle 2020-09-11 11:15:44 -04:00
parent 8d8389da74
commit 20ee878d0e
2 changed files with 6 additions and 3 deletions

View File

@ -157,7 +157,11 @@ type ChangeSrc struct {
// storage.
Before, After DynamicValue
// Marked Paths
// BeforeValMarks and AfterValMarks are stored path+mark combinations
// that might be discovered when encoding a change. Marks are removed
// to enable encoding (marked values cannot be marshalled), and so storing
// the path+mark combinations allow us to re-mark the value later
// when, for example, displaying the diff to the UI.
BeforeValMarks, AfterValMarks []cty.PathValueMarks
}

View File

@ -148,8 +148,7 @@ func (n *EvalDiff) Eval(ctx EvalContext) (interface{}, error) {
var unmarkedPaths []cty.PathValueMarks
if configVal.ContainsMarked() {
// store the marked values so we can re-mark them later after
// we've sent things over the wire. Right now this stores
// one path for proof of concept, but we should store multiple
// we've sent things over the wire.
unmarkedConfigVal, unmarkedPaths = configVal.UnmarkDeepWithPaths()
}