@@ -290,7 +290,7 @@ func Hello() {
290
290
291
291
t .Run ("without workspace module" , func (t * testing.T ) {
292
292
withOptions (
293
- WithModes (Singleton ),
293
+ Modes (Singleton ),
294
294
).run (t , noMod , func (t * testing.T , env * Env ) {
295
295
env .Await (
296
296
env .DiagnosticAtRegexp ("main.go" , `"mod.com/bob"` ),
@@ -424,7 +424,7 @@ func TestResolveDiagnosticWithDownload(t *testing.T) {
424
424
// diagnostic for the wrong formatting type.
425
425
// TODO: we should be able to easily also match the diagnostic message.
426
426
env .Await (env .DiagnosticAtRegexp ("print.go" , "fmt.Printf" ))
427
- }, WithProxyFiles (testPackageWithRequireProxy ))
427
+ }, ProxyFiles (testPackageWithRequireProxy ))
428
428
}
429
429
430
430
func TestMissingDependency (t * testing.T ) {
@@ -655,7 +655,7 @@ func main() {
655
655
}
656
656
`
657
657
withOptions (
658
- WithProxyFiles (ardanLabsProxy ),
658
+ ProxyFiles (ardanLabsProxy ),
659
659
).run (t , ardanLabs , func (t * testing.T , env * Env ) {
660
660
// Expect a diagnostic with a suggested fix to add
661
661
// "github.com/ardanlabs/conf" to the go.mod file.
@@ -713,7 +713,7 @@ go 1.12
713
713
-- main.go --
714
714
`
715
715
withOptions (
716
- WithProxyFiles (ardanLabsProxy ),
716
+ ProxyFiles (ardanLabsProxy ),
717
717
).run (t , emptyFile , func (t * testing.T , env * Env ) {
718
718
env .OpenFile ("main.go" )
719
719
env .EditBuffer ("main.go" , fake .NewEdit (0 , 0 , 0 , 0 , `package main
@@ -1251,13 +1251,13 @@ func main() {
1251
1251
var x int
1252
1252
}
1253
1253
`
1254
- withOptions (WithRootPath ("a" )).run (t , mod , func (t * testing.T , env * Env ) {
1254
+ withOptions (RootPath ("a" )).run (t , mod , func (t * testing.T , env * Env ) {
1255
1255
env .OpenFile ("a/main.go" )
1256
1256
env .Await (
1257
1257
env .DiagnosticAtRegexp ("main.go" , "x" ),
1258
1258
)
1259
1259
})
1260
- withOptions (WithRootPath ("a" ), LimitWorkspaceScope ()).run (t , mod , func (t * testing.T , env * Env ) {
1260
+ withOptions (RootPath ("a" ), LimitWorkspaceScope ()).run (t , mod , func (t * testing.T , env * Env ) {
1261
1261
env .OpenFile ("a/main.go" )
1262
1262
env .Await (
1263
1263
NoDiagnostics ("main.go" ),
@@ -1475,7 +1475,7 @@ package foo_
1475
1475
`
1476
1476
1477
1477
withOptions (
1478
- WithProxyFiles (proxy ),
1478
+ ProxyFiles (proxy ),
1479
1479
InGOPATH (),
1480
1480
).run (t , contents , func (t * testing.T , env * Env ) {
1481
1481
// Simulate typing character by character.
@@ -1625,7 +1625,7 @@ import (
1625
1625
EditorConfig {
1626
1626
Env : map [string ]string {"GO111MODULE" : "off" },
1627
1627
},
1628
- WithModes (Singleton ),
1628
+ Modes (Singleton ),
1629
1629
).run (t , mod , func (t * testing.T , env * Env ) {
1630
1630
env .Await (
1631
1631
env .DiagnosticAtRegexpWithMessage ("main.go" , `"nosuchpkg"` , `cannot find package "nosuchpkg" in any of` ),
@@ -1652,7 +1652,7 @@ package b
1652
1652
for _ , go111module := range []string {"on" , "auto" } {
1653
1653
t .Run ("GO111MODULE=" + go111module , func (t * testing.T ) {
1654
1654
withOptions (
1655
- WithModes (Singleton ),
1655
+ Modes (Singleton ),
1656
1656
EditorConfig {
1657
1657
Env : map [string ]string {
1658
1658
"GO111MODULE" : go111module ,
@@ -1673,7 +1673,7 @@ package b
1673
1673
// Expect no warning if GO111MODULE=auto in a directory in GOPATH.
1674
1674
t .Run ("GOPATH_GO111MODULE_auto" , func (t * testing.T ) {
1675
1675
withOptions (
1676
- WithModes (Singleton ),
1676
+ Modes (Singleton ),
1677
1677
EditorConfig {
1678
1678
Env : map [string ]string {
1679
1679
"GO111MODULE" : "auto" ,
@@ -1738,8 +1738,8 @@ package hello
1738
1738
func helloHelper() {}
1739
1739
`
1740
1740
withOptions (
1741
- WithProxyFiles (proxy ),
1742
- WithModes (Singleton ),
1741
+ ProxyFiles (proxy ),
1742
+ Modes (Singleton ),
1743
1743
).run (t , nested , func (t * testing.T , env * Env ) {
1744
1744
// Expect a diagnostic in a nested module.
1745
1745
env .OpenFile ("nested/hello/hello.go" )
0 commit comments