MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / UpdateMenu

Method UpdateMenu

internal/service/menu.go:74–81  ·  view source on GitHub ↗

UpdateMenu 更新菜单信息

(ctx context.Context, menu *domain.Menu)

Source from the content-addressed store, hash-verified

72
73// UpdateMenu 更新菜单信息
74func (m *menuService) UpdateMenu(ctx context.Context, menu *domain.Menu) error {
75 if menu == nil {
76 m.l.Warn("菜单不能为空")
77 return errors.New("菜单不能为空")
78 }
79
80 return m.repo.UpdateMenu(ctx, menu)
81}
82
83// DeleteMenu 删除指定ID的菜单
84func (m *menuService) DeleteMenu(ctx context.Context, id int) error {

Callers

nothing calls this directly

Calls 1

UpdateMenuMethod · 0.65

Tested by

no test coverage detected