2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 13:47:15 +08:00

chore: fix lint

This commit is contained in:
耗子
2024-05-30 02:27:35 +08:00
parent 73cc5a35ad
commit 76e992cc9e
8 changed files with 73 additions and 60 deletions

View File

@@ -58,7 +58,7 @@ func (r *PluginImpl) All() []types.Plugin {
return plugins
}
// GetBySlug 根据slug获取插件
// GetBySlug 根据 slug 获取插件
func (r *PluginImpl) GetBySlug(slug string) types.Plugin {
for _, item := range r.All() {
if item.Slug == slug {
@@ -69,7 +69,7 @@ func (r *PluginImpl) GetBySlug(slug string) types.Plugin {
return types.Plugin{}
}
// GetInstalledBySlug 根据slug获取已安装的插件
// GetInstalledBySlug 根据 slug 获取已安装的插件
func (r *PluginImpl) GetInstalledBySlug(slug string) models.Plugin {
var plugin models.Plugin
if err := facades.Orm().Query().Where("slug", slug).Get(&plugin); err != nil {