diff --git a/reference.go b/reference.go index 31280d5..0b26c10 100644 --- a/reference.go +++ b/reference.go @@ -37,16 +37,6 @@ func (ref Reference) Name() string { return fmt.Sprintf("${%s}", strings.ReplaceAll(ref.TargetPath.String(), ".", ":")) } -type ResolvedReference struct { - Reference - // TargetValue is the value to which the TargetPath points to. - // If TargetReference is not nil, this value must be [data.NilValue]. - TargetValue data.Value - // TargetReference is non-nil if the Reference points to another [ResolvedReference] - // If the Reference just points to a scalar value, this will be nil. - TargetReference *ResolvedReference -} - type ReferenceSourceWalker interface { WalkValues(func(path data.Path, value data.Value) error) error } diff --git a/reference_test.go b/reference_test.go index dfc1366..f120d68 100644 --- a/reference_test.go +++ b/reference_test.go @@ -50,9 +50,9 @@ func TestResolveReferencesSimple(t *testing.T) { // Test: resolve all valid references which have a direct TargetValue resolved, err := ResolveReferences(expectedReferencesSimple, class) assert.NoError(t, err) - assert.Len(t, resolved, len(expectedReferencesSimple), "Every Reference should emit a ResolveReference") + assert.Len(t, resolved, len(expectedReferencesSimple)) for _, resolved := range resolved { - assert.Contains(t, expectedReferencesSimple, resolved, "ResolvedReference should be returned") + assert.Contains(t, expectedReferencesSimple, resolved) } // Test: references with invalid TargetPath