Skip to content

Support set menu component #955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style: format code with Gofumpt
This commit fixes the style issues introduced in a89838b according to the output
from Gofumpt.

Details: #955
  • Loading branch information
deepsource-autofix[bot] authored Apr 30, 2025
commit fff7325c6e46cc7e89af9829c0b4dbd7908f680c
6 changes: 3 additions & 3 deletions presets/menu_order.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
type MenuOrderBuilder struct {
p *Builder
// string or *MenuGroupBuilder
order []interface{}
modelMap map[string]*ModelBuilder
order []interface{}
modelMap map[string]*ModelBuilder
menuComponentFunc func(menus []h.HTMLComponent, menuGroupSelected, menuItemSelected string) h.HTMLComponent
once sync.Once
once sync.Once
}

type menuOrderItem struct {
Expand All @@ -31,9 +31,9 @@
return &MenuOrderBuilder{p: b}
}

func (b *MenuOrderBuilder) MenuComponentFunc(fn func(menus []h.HTMLComponent, menuGroupSelected, menuItemSelected string) h.HTMLComponent) *MenuOrderBuilder {
b.menuComponentFunc = fn
return b

Check warning on line 36 in presets/menu_order.go

View check run for this annotation

Codecov / codecov/patch

presets/menu_order.go#L34-L36

Added lines #L34 - L36 were not covered by tests
}

func (b *MenuOrderBuilder) isMenuGroupInOrder(mgb *MenuGroupBuilder) bool {
Expand Down
Loading