mirror of
https://github.com/golang/go
synced 2024-11-12 02:00:23 -07:00
cmd/go: run examples even if -run is set if -example is also set
Allows one to disable everything but the example being debugged. This time for sure. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5700079
This commit is contained in:
parent
2d6a6ed9fc
commit
28668c3a28
@ -23,7 +23,7 @@ type InternalExample struct {
|
||||
}
|
||||
|
||||
func RunExamples(matchString func(pat, str string) (bool, error), examples []InternalExample) (ok bool) {
|
||||
if *match != "" {
|
||||
if *match != "" && *matchExamples == "" {
|
||||
return // Don't run examples if testing is restricted: we're debugging.
|
||||
}
|
||||
ok = true
|
||||
|
Loading…
Reference in New Issue
Block a user