tanmayrauth commented on PR #1343:
URL: https://github.com/apache/iceberg-go/pull/1343#issuecomment-4878119858
I've made the changes @laskoviymishka, but two things: type MetricsReport
any is already a defined type, not an alias, an alias would need = any, so it's
already distinct from any for type-identity purposes. And our own .golangci.yml
has a gofmt rewrite rule interface{} -> any, so interface{} gets formatted
straight back to any on commit.
The deeper point — neither spelling restricts what satisfies it: Report(ctx,
42) compiles either way, since any value satisfies an empty interface, and type
switches get no compiler-enforced arm coverage from an open interface
regardless of spelling. If we want that guarantee when the REST reporter lands,
the real lever is sealing the interface with an unexported marker method
(isMetricsReport()), which the concrete types implement. That's a deliberate
call though — it bars third-party report types, which the current godoc
intentionally allows. Happy to seal it if you'd prefer closed; otherwise I
think any is the honest representation of an open marker.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]