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

Method DeleteMenu

internal/service/menu.go:84–91  ·  view source on GitHub ↗

DeleteMenu 删除指定ID的菜单

(ctx context.Context, id int)

Source from the content-addressed store, hash-verified

82
83// DeleteMenu 删除指定ID的菜单
84func (m *menuService) DeleteMenu(ctx context.Context, id int) error {
85 if id <= 0 {
86 m.l.Warn("菜单ID无效", zap.Int("ID", id))
87 return errors.New("菜单ID无效")
88 }
89
90 return m.repo.DeleteMenu(ctx, id)
91}
92
93// GetMenuTree 获取菜单树形结构
94func (m *menuService) GetMenuTree(ctx context.Context) ([]*domain.Menu, error) {

Callers

nothing calls this directly

Calls 1

DeleteMenuMethod · 0.65

Tested by

no test coverage detected