Skip to content

Commit eaad607

Browse files
committed
chore: lint
1 parent 688b4e7 commit eaad607

4 files changed

Lines changed: 22 additions & 22 deletions

File tree

cmd/plugins.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ var pluginsInfoCmd = &cobra.Command{
6464
RunE: func(cmd *cobra.Command, args []string) error {
6565
name := args[0]
6666
existing := betterdiscord.FindAddon(betterdiscord.AddonPlugin, name)
67-
if existing == nil {
68-
output.Printf("❌ Plugin '%s' not found.\n", name)
69-
return nil
70-
}
67+
if existing == nil {
68+
output.Printf("❌ Plugin '%s' not found.\n", name)
69+
return nil
70+
}
7171

72-
betterdiscord.LogLocalAddonInfo(existing)
72+
betterdiscord.LogLocalAddonInfo(existing)
7373
return nil
7474
},
7575
}

cmd/themes.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ var themesInfoCmd = &cobra.Command{
5252
RunE: func(cmd *cobra.Command, args []string) error {
5353
name := args[0]
5454
existing := betterdiscord.FindAddon(betterdiscord.AddonTheme, name)
55-
if existing == nil {
56-
output.Printf("❌ Theme '%s' not found.\n", name)
57-
return nil
58-
}
55+
if existing == nil {
56+
output.Printf("❌ Theme '%s' not found.\n", name)
57+
return nil
58+
}
5959

60-
betterdiscord.LogLocalAddonInfo(existing)
60+
betterdiscord.LogLocalAddonInfo(existing)
6161
return nil
6262
},
6363
}

internal/betterdiscord/addons.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type AddonEntry struct {
3535
// ResolvedAddon holds both local and store metadata for an addon.
3636
type ResolvedAddon struct {
3737
Store *models.StoreAddon // Metadata from store (nil if not found)
38-
Path string // Local install path
38+
Path string // Local install path
3939
}
4040

4141
// ListAddons returns the locally installed addons for the given kind.

internal/betterdiscord/store.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,17 @@ func ResolveAddonIdentifier(identifier string) (int, string, bool) {
131131
func FetchAddonsOfType(kind string) ([]models.StoreAddon, error) {
132132
k := strings.ToLower(kind)
133133

134-
var endpoint string
135-
switch k {
136-
case "", "addon", "addons":
137-
endpoint = "addons"
138-
case "plugin", "plugins":
139-
endpoint = "plugins"
140-
case "theme", "themes":
141-
endpoint = "themes"
142-
default:
143-
return nil, fmt.Errorf("invalid addon kind %q (expected plugin[s], theme[s], or addon[s])", kind)
144-
}
134+
var endpoint string
135+
switch k {
136+
case "", "addon", "addons":
137+
endpoint = "addons"
138+
case "plugin", "plugins":
139+
endpoint = "plugins"
140+
case "theme", "themes":
141+
endpoint = "themes"
142+
default:
143+
return nil, fmt.Errorf("invalid addon kind %q (expected plugin[s], theme[s], or addon[s])", kind)
144+
}
145145
apiURL := fmt.Sprintf("https://api.betterdiscord.app/v3/store/%s", endpoint)
146146

147147
addons, err := utils.DownloadJSON[[]models.StoreAddon](apiURL)

0 commit comments

Comments
 (0)