chore: declare static capabilities as methods (#30483)
This commit is contained in:
parent
e34459a73f
commit
9bf76fca06
2 changed files with 5 additions and 4 deletions
|
|
@ -115,6 +115,7 @@ Deep documentation on specific subsystems is available in `docs/agents/`. Load w
|
|||
- `_enumer.go` - generated enum code
|
||||
- `*_decorators.go` - generated decorator pattern implementations
|
||||
- Validate interface implementations: `var _ Interface = (*Type)(nil)`
|
||||
- Capabilities: register via `implement.Has`/`May` only when a capability is *conditional* (runtime/config detection, e.g. `if cp.PhaseSwitching { implement.Has(...) }`). For capabilities present on every code path, declare a plain exported method plus `var _ api.Interface = (*Type)(nil)` instead. `api.Cap` resolves static methods via direct type assertion, so unconditional `implement.Has` is redundant. A type with no conditional capabilities needs neither the `implement.Caps` embed nor `implement.New()`
|
||||
|
||||
### Error Handling
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue