mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: golang.org/x/tools v0.14.0, golang.org/x/mod v0.13.0, golang.org/x/sync v0.4.0
full diff: - https://github.com/golang/tools/compare/v0.10.0...v0.14.0 - https://github.com/golang/mod/compare/v0.11.0...v0.13.0 - https://github.com/golang/sync/compare/v0.3.0...v0.4.0 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
5
vendor/golang.org/x/tools/cmd/stringer/stringer.go
generated
vendored
5
vendor/golang.org/x/tools/cmd/stringer/stringer.go
generated
vendored
@ -188,6 +188,8 @@ type Generator struct {
|
||||
|
||||
trimPrefix string
|
||||
lineComment bool
|
||||
|
||||
logf func(format string, args ...interface{}) // test logging hook; nil when not testing
|
||||
}
|
||||
|
||||
func (g *Generator) Printf(format string, args ...interface{}) {
|
||||
@ -221,13 +223,14 @@ func (g *Generator) parsePackage(patterns []string, tags []string) {
|
||||
// in a separate pass? For later.
|
||||
Tests: false,
|
||||
BuildFlags: []string{fmt.Sprintf("-tags=%s", strings.Join(tags, " "))},
|
||||
Logf: g.logf,
|
||||
}
|
||||
pkgs, err := packages.Load(cfg, patterns...)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if len(pkgs) != 1 {
|
||||
log.Fatalf("error: %d packages found", len(pkgs))
|
||||
log.Fatalf("error: %d packages matching %v", len(pkgs), strings.Join(patterns, " "))
|
||||
}
|
||||
g.addPackage(pkgs[0])
|
||||
}
|
||||
|
Reference in New Issue
Block a user