fix arguments too long error

This commit is contained in:
Han Kang
2021-02-08 11:44:47 -08:00
parent db107b190c
commit c3f550f3cb
3 changed files with 25 additions and 33 deletions

View File

@@ -74,12 +74,16 @@ func main() {
if len(errors) != 0 {
os.Exit(1)
}
if len(stableMetrics) == 0 {
os.Exit(0)
}
sort.Sort(byFQName(stableMetrics))
data, err := yaml.Marshal(stableMetrics)
if err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err)
os.Exit(1)
}
fmt.Print(string(data))
}