cleanup: add godoc

This commit is contained in:
Alexander Zielenski 2023-10-13 13:50:19 -07:00
parent 4dedabf2a6
commit 0495616230

View File

@ -20,6 +20,13 @@ import (
"reflect" "reflect"
) )
// CorrelatedObject represents a node in a tree of objects that are being
// validated. It is used to keep track of the old value of an object during
// traversal of the new value. It is also used to cache the results of
// DeepEqual comparisons between the old and new values of objects.
//
// CorrelatedObject is not thread-safe. It is the responsibility of the caller
// to handle concurrency, if any.
type CorrelatedObject struct { type CorrelatedObject struct {
// Currently correlated old value during traversal of the schema/object // Currently correlated old value during traversal of the schema/object
OldValue interface{} OldValue interface{}
@ -27,6 +34,8 @@ type CorrelatedObject struct {
// Value being validated // Value being validated
Value interface{} Value interface{}
// Schema used for validation of this value. The schema is also used
// to determine how to correlate the old object.
Schema Schema Schema Schema
// Scratch space below, may change during validation // Scratch space below, may change during validation