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
Update vendored tools/.
This commit is contained in:
6
tools/vendor/golang.org/x/tools/cmd/goimports/doc.go
generated
vendored
6
tools/vendor/golang.org/x/tools/cmd/goimports/doc.go
generated
vendored
@@ -5,9 +5,9 @@ adding missing ones and removing unreferenced ones.
|
||||
|
||||
$ go get golang.org/x/tools/cmd/goimports
|
||||
|
||||
It's a drop-in replacement for your editor's gofmt-on-save hook.
|
||||
It has the same command-line interface as gofmt and formats
|
||||
your code in the same way.
|
||||
In addition to fixing imports, goimports also formats
|
||||
your code in the same style as gofmt so it can be used
|
||||
as a replacement for your editor's gofmt-on-save hook.
|
||||
|
||||
For emacs, make sure you have the latest go-mode.el:
|
||||
https://github.com/dominikh/go-mode.el
|
||||
|
7
tools/vendor/golang.org/x/tools/cmd/goimports/goimports.go
generated
vendored
7
tools/vendor/golang.org/x/tools/cmd/goimports/goimports.go
generated
vendored
@@ -144,12 +144,19 @@ func processFile(filename string, in io.Reader, out io.Writer, argType argumentT
|
||||
fmt.Fprintln(out, filename)
|
||||
}
|
||||
if *write {
|
||||
if argType == fromStdin {
|
||||
// filename is "<standard input>"
|
||||
return errors.New("can't use -w on stdin")
|
||||
}
|
||||
err = ioutil.WriteFile(filename, res, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if *doDiff {
|
||||
if argType == fromStdin {
|
||||
filename = "stdin.go" // because <standard input>.orig looks silly
|
||||
}
|
||||
data, err := diff(src, res, filename)
|
||||
if err != nil {
|
||||
return fmt.Errorf("computing diff: %s", err)
|
||||
|
Reference in New Issue
Block a user