Skip to content

feat(pagebuilder): add FindContainerByName and GetRenderFunc public accessors#1072

Open
eideroliveira wants to merge 1 commit into
qor5:mainfrom
eideroliveira:pr/pagebuilder-fixes
Open

feat(pagebuilder): add FindContainerByName and GetRenderFunc public accessors#1072
eideroliveira wants to merge 1 commit into
qor5:mainfrom
eideroliveira:pr/pagebuilder-fixes

Conversation

@eideroliveira
Copy link
Copy Markdown
Contributor

Summary

Two public accessor methods for pagebuilder.Builder and ContainerBuilder:

  • Builder.FindContainerByName(name) — non-panicking variant of ContainerByName. Returns nil when no container with the given name is registered, making it safe for public-facing routes where a stale DB row may reference a container type that has since been removed.

  • ContainerBuilder.GetRenderFunc() — exposes the registered render function so callers outside the pagebuilder (e.g. a public route rendering a page's containers) can dispatch rendering without duplicating the model-name → render-function mapping.

Test plan

  • FindContainerByName returns the correct builder for registered names
  • FindContainerByName returns nil for unregistered names (no panic)
  • GetRenderFunc returns the function set via RenderFunc()

…ccessors

FindContainerByName is the non-panicking variant of ContainerByName — it
returns nil when no container with the given name is registered, making it
safe for public-facing routes where a stale DB row may reference a
container type that has since been removed.

GetRenderFunc exposes the registered render function on ContainerBuilder
so callers outside the pagebuilder (e.g. a public route rendering a
page's containers) can dispatch rendering without duplicating the
model-name to render-function mapping.
@deepsource-io
Copy link
Copy Markdown

deepsource-io Bot commented May 8, 2026

DeepSource Code Review

We reviewed changes in a72f7fd...2efcf51 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Go May 8, 2026 5:24p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant