Skip to content

fix(docs): dereference MenuItem pointer in example code#175

Open
KEHyeon wants to merge 2 commits intogenkit-ai:mainfrom
KEHyeon:main
Open

fix(docs): dereference MenuItem pointer in example code#175
KEHyeon wants to merge 2 commits intogenkit-ai:mainfrom
KEHyeon:main

Conversation

@KEHyeon
Copy link
Copy Markdown

@KEHyeon KEHyeon commented Nov 13, 2025

The documentation example used []MenuItem{item}, but the GenerateData function
returns a pointer (*MenuItem). This caused a mismatch because Menu.Items expects
a slice of values ([]MenuItem), not pointers.

This commit updates the example to use []MenuItem{*item} to correctly
dereference the pointer before adding it to the slice.

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