diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-09-11 17:35:17 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-09-11 17:35:17 +0200 |
| commit | 635c0f118a490112ca2ee797c92f1dd14e6eeed7 (patch) | |
| tree | 74f2d72d8b768cbe69b45d9adeb4651a9d6efe73 | |
| parent | 5e9fc455839499ff8f5600ef1515ca4668d9049c (diff) | |
| download | go-gg-635c0f118a490112ca2ee797c92f1dd14e6eeed7.tar.gz | |
add TODOs
| -rw-r--r-- | go.mod | 1 | ||||
| -rw-r--r-- | jsonmatch/interface.go | 5 |
2 files changed, 6 insertions, 0 deletions
@@ -1,3 +1,4 @@ module go.xyrillian.de/gg +// TODO for 1.27: use sql.ConvertAssign for gg/option; deprecate gg/options and offer methods on Option instead; make jsonmatch.Pointer into an alias of jsontext.Pointer go 1.26 diff --git a/jsonmatch/interface.go b/jsonmatch/interface.go index f36967a..b0aa490 100644 --- a/jsonmatch/interface.go +++ b/jsonmatch/interface.go @@ -276,6 +276,11 @@ func CaptureField[T any](target *T) any { // after traversal, CapturedField() instances are checked to see if they actually had the expected value // -> problem: invocations of CaptureField() and CapturedField() look very similar // -> idea: CaptureField() returns an object, and then we can call field.Ref() at the reference site +// -> new idea: just allow multiple CaptureField() with the same pointer, first instance found during traversal writes the value, additional instances complain if not matching + +// TODO: a cousin of type Object (maybe "type AbridgedObject"?) where only some fields are specified and all others are implied as Irrelevant() +// +// -> usecase: PUT an object as setup and capture only the ID while ignoring everything else because that's not the point of the test type capturedField struct { PointerToTarget any |
