diff --git a/exporter.go b/exporter.go index d98a45b1e..2d529e6ce 100644 --- a/exporter.go +++ b/exporter.go @@ -172,9 +172,9 @@ func main() { collectorNames := collector.Available() sort.Strings(collectorNames) - fmt.Printf("Available collectors:\n") + fmt.Printf("Available collectors:\n") //nolint:forbidigo for _, n := range collectorNames { - fmt.Printf(" - %s\n", n) + fmt.Printf(" - %s\n", n) //nolint:forbidigo } return diff --git a/pkg/collector/mssql/mssql.go b/pkg/collector/mssql/mssql.go index f3e23e9a5..a91d9a5b5 100644 --- a/pkg/collector/mssql/mssql.go +++ b/pkg/collector/mssql/mssql.go @@ -1923,10 +1923,11 @@ func (c *Collector) Build() error { c.mssqlCollectors = c.getMSSQLCollectors() if *c.mssqlPrintCollectors { - fmt.Printf("Available SQLServer Classes:\n") + fmt.Printf("Available SQLServer Classes:\n") //nolint:forbidigo for name := range c.mssqlCollectors { - fmt.Printf(" - %s\n", name) + fmt.Printf(" - %s\n", name) //nolint:forbidigo } + os.Exit(0) }