style: one entry per line in map/slice literals

Put each entry on its own line for readability — no staggering
multiple entries per line.
This commit is contained in:
AJ ONeal
2026-03-10 23:29:22 -06:00
parent b8c67491fe
commit f53c508303
2 changed files with 45 additions and 15 deletions

View File

@@ -212,29 +212,51 @@ func IsMetaAsset(name string) bool {
lower := strings.ToLower(name)
for _, suffix := range []string{
".txt",
".sha256", ".sha256sum", ".sha512", ".sha512sum",
".md5", ".md5sum", ".sig", ".asc", ".pem",
".sbom", ".spdx", ".json.sig", ".sigstore", ".minisig",
"_src.tar.gz", "_src.tar.xz", "_src.zip",
"-src.tar.gz", "-src.tar.xz", "-src.zip",
".d.ts", ".pub",
".sha256",
".sha256sum",
".sha512",
".sha512sum",
".md5",
".md5sum",
".sig",
".asc",
".pem",
".sbom",
".spdx",
".json.sig",
".sigstore",
".minisig",
"_src.tar.gz",
"_src.tar.xz",
"_src.zip",
"-src.tar.gz",
"-src.tar.xz",
"-src.zip",
".d.ts",
".pub",
} {
if strings.HasSuffix(lower, suffix) {
return true
}
}
for _, substr := range []string{
"checksums", "sha256sum", "sha512sum",
"checksums",
"sha256sum",
"sha512sum",
"buildable-artifact",
".LICENSE", ".README",
".LICENSE",
".README",
} {
if strings.Contains(lower, substr) {
return true
}
}
for _, exact := range []string{
"install.sh", "install.ps1", "compat.json",
"b3sums", "dist-manifest.json",
"install.sh",
"install.ps1",
"compat.json",
"b3sums",
"dist-manifest.json",
} {
if lower == exact {
return true

View File

@@ -166,11 +166,19 @@ func Read(path string) (*Conf, error) {
// Collect unrecognized keys.
known := map[string]bool{
"source": true, "owner": true, "repo": true,
"base_url": true, "url": true,
"tag_prefix": true, "version_prefix": true, "version_prefixes": true,
"exclude": true, "asset_exclude": true, "asset_filter": true,
"variants": true, "alias_of": true,
"source": true,
"owner": true,
"repo": true,
"base_url": true,
"url": true,
"tag_prefix": true,
"version_prefix": true,
"version_prefixes": true,
"exclude": true,
"asset_exclude": true,
"asset_filter": true,
"variants": true,
"alias_of": true,
}
for k, v := range raw {
if !known[k] {