You've already forked postgres_exporter
mirror of
https://github.com/prometheus-community/postgres_exporter.git
synced 2025-08-06 17:22:43 +03:00
Refactor repository layout and convert build system to Mage.
This commit implements a massive refactor of the repository, and moves the build system over to use Mage (magefile.org) which should allow seamless building across multiple platforms.
This commit is contained in:
10
tools/vendor/github.com/opennota/check/cmd/varcheck/varcheck.go
generated
vendored
10
tools/vendor/github.com/opennota/check/cmd/varcheck/varcheck.go
generated
vendored
@@ -24,13 +24,15 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"go/types"
|
||||
|
||||
"github.com/kisielk/gotool"
|
||||
"golang.org/x/tools/go/loader"
|
||||
"go/types"
|
||||
)
|
||||
|
||||
var (
|
||||
reportExported = flag.Bool("e", false, "Report exported variables and constants")
|
||||
buildTags = flag.String("tags", "", "Build tags")
|
||||
)
|
||||
|
||||
type object struct {
|
||||
@@ -102,6 +104,9 @@ func (v *visitor) Visit(node ast.Node) ast.Visitor {
|
||||
for _, val := range node.Values {
|
||||
ast.Walk(v, val)
|
||||
}
|
||||
if node.Type != nil {
|
||||
ast.Walk(v, node.Type)
|
||||
}
|
||||
return nil
|
||||
|
||||
case *ast.FuncDecl:
|
||||
@@ -133,6 +138,9 @@ func main() {
|
||||
}
|
||||
|
||||
ctx := build.Default
|
||||
if *buildTags != "" {
|
||||
ctx.BuildTags = strings.Fields(*buildTags)
|
||||
}
|
||||
loadcfg := loader.Config{
|
||||
Build: &ctx,
|
||||
}
|
||||
|
Reference in New Issue
Block a user