1
0
mirror of https://github.com/prometheus-community/postgres_exporter.git synced 2025-08-08 04:42:07 +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:
Will Rouesnel
2018-02-23 01:55:49 +11:00
parent 3e6cf08dc5
commit 989489096e
269 changed files with 35309 additions and 2017 deletions

51
tools/vendor/github.com/tmthrgd/go-bindata/common.go generated vendored Normal file
View File

@@ -0,0 +1,51 @@
// Copyright 2017 Tom Thorogood. All rights reserved.
// Use of this source code is governed by a Modified
// BSD License that can be found in the LICENSE file.
package bindata
import "text/template"
func init() {
template.Must(baseTemplate.New("common").Parse(`// Asset loads and returns the asset for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func Asset(name string) ([]byte, error) {
data, _, err := AssetAndInfo(name)
return data, err
}
// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
func MustAsset(name string) []byte {
a, err := Asset(name)
if err != nil {
panic("asset: Asset(" + name + "): " + err.Error())
}
return a
}
// AssetNames returns the names of the assets.
func AssetNames() []string {
names := make([]string, 0, len(_bindata))
for name := range _bindata {
names = append(names, name)
}
return names
}
{{- if $.Restore}}
// RestoreAsset restores an asset under the given directory
func RestoreAsset(dir, name string) error {
return restore.Asset(dir, name, AssetAndInfo)
}
// RestoreAssets restores an asset under the given directory recursively
func RestoreAssets(dir, name string) error {
return restore.Assets(dir, name, AssetDir, AssetAndInfo)
}
{{- end}}`))
}