1
0
mirror of https://github.com/prometheus-community/postgres_exporter.git synced 2025-08-09 15:42:47 +03:00
Files
postgres_exporter/tools/vendor/github.com/mvdan/unparam/main.go
2017-08-04 02:30:33 +10:00

34 lines
617 B
Go

// Copyright (c) 2017, Daniel Martí <mvdan@mvdan.cc>
// See LICENSE for licensing information
package main
import (
"flag"
"fmt"
"os"
"github.com/mvdan/unparam/check"
)
var (
tests = flag.Bool("tests", true, "include tests")
debug = flag.Bool("debug", false, "debug prints")
)
func main() {
flag.Usage = func() {
fmt.Fprintln(os.Stderr, "usage: unparam [flags] [package ...]")
flag.PrintDefaults()
}
flag.Parse()
warns, err := check.UnusedParams(*tests, *debug, flag.Args()...)
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
for _, warn := range warns {
fmt.Println(warn)
}
}