1
0
mirror of https://github.com/golang/go synced 2024-11-18 18:34:40 -07:00

go/gcexportdata: make test portable to MS Windows

Fixes issue #17565

Change-Id: I67d2e11acae873ac47694a73ced40d2db38c0fc0
Reviewed-on: https://go-review.googlesource.com/31813
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Alan Donovan 2016-10-24 12:16:06 -04:00
parent c6efba04dd
commit 0f7f54c9d9

View File

@ -51,7 +51,8 @@ func ExampleRead() {
fmt.Printf("Package members: %s...\n", pkg.Scope().Names()[:5])
println := pkg.Scope().Lookup("Println")
posn := fset.Position(println.Pos())
posn.Line = 123 // make example deterministic
posn.Line = 123 // make example deterministic
posn.Filename = filepath.ToSlash(posn.Filename) // make example deterministic
fmt.Printf("Println type: %s\n", println.Type())
fmt.Printf("Println location: %s\n", posn)