diff options
author | Martin Fischer <martin@push-f.com> | 2025-04-06 21:23:39 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2025-04-06 21:23:39 +0200 |
commit | 5ad1feb9925cb4c4b25913aa88f864a062c58ffa (patch) | |
tree | b611043afbef5afab801896a86b7fa5edb5309c5 | |
parent | d8b675d3670a70df15ec46dfd9a1bb9f801aae41 (diff) |
fix: fail if no features were found
-rw-r--r-- | build.go | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -83,12 +83,10 @@ func main() { versions := make([]Version, 0) sortedVersions := slices.SortedFunc(maps.Keys(versionInfos), compareVersion) slices.Reverse(sortedVersions) + featureCount := 0 for _, name := range append([]string{"unstable"}, sortedVersions...) { features := getFeatures(caniuseRepo, name) - if len(features) == 0 { - log.Infof("no features found for %s", name) - } libFeatures := make([]Feature, 0) nonLibFeatures := make([]Feature, 0) for _, feature := range features { @@ -111,6 +109,11 @@ func main() { } versions = append(versions, version) + featureCount += len(features) + } + + if featureCount == 0 { + log.Fatal("found no features") } tmpl := template.New("template.html.tmpl").Funcs(template.FuncMap{ |