refactor: use a more modern writing style to simplify code (#3834)

Signed-off-by: deepdring <deepdrink@icloud.com>
This commit is contained in:
deepdring
2025-08-26 08:00:51 +08:00
committed by GitHub
parent 094b02da4c
commit b8057f28c6
24 changed files with 98 additions and 100 deletions

View File

@@ -228,7 +228,7 @@ func GetAllPluginPackages(out io.Writer) PluginPackages {
if strs, ok := data.([]string); ok {
return strs
}
if ifs, ok := data.([]interface{}); ok {
if ifs, ok := data.([]any); ok {
result := make([]string, len(ifs))
for i, urlIf := range ifs {
if url, ok := urlIf.(string); ok {