@@ -290,7 +290,7 @@ func Hello() {
290290
291291 t .Run ("without workspace module" , func (t * testing.T ) {
292292 withOptions (
293- WithModes (Singleton ),
293+ Modes (Singleton ),
294294 ).run (t , noMod , func (t * testing.T , env * Env ) {
295295 env .Await (
296296 env .DiagnosticAtRegexp ("main.go" , `"mod.com/bob"` ),
@@ -424,7 +424,7 @@ func TestResolveDiagnosticWithDownload(t *testing.T) {
424424 // diagnostic for the wrong formatting type.
425425 // TODO: we should be able to easily also match the diagnostic message.
426426 env .Await (env .DiagnosticAtRegexp ("print.go" , "fmt.Printf" ))
427- }, WithProxyFiles (testPackageWithRequireProxy ))
427+ }, ProxyFiles (testPackageWithRequireProxy ))
428428}
429429
430430func TestMissingDependency (t * testing.T ) {
@@ -655,7 +655,7 @@ func main() {
655655}
656656`
657657 withOptions (
658- WithProxyFiles (ardanLabsProxy ),
658+ ProxyFiles (ardanLabsProxy ),
659659 ).run (t , ardanLabs , func (t * testing.T , env * Env ) {
660660 // Expect a diagnostic with a suggested fix to add
661661 // "github.com/ardanlabs/conf" to the go.mod file.
@@ -713,7 +713,7 @@ go 1.12
713713-- main.go --
714714`
715715 withOptions (
716- WithProxyFiles (ardanLabsProxy ),
716+ ProxyFiles (ardanLabsProxy ),
717717 ).run (t , emptyFile , func (t * testing.T , env * Env ) {
718718 env .OpenFile ("main.go" )
719719 env .EditBuffer ("main.go" , fake .NewEdit (0 , 0 , 0 , 0 , `package main
@@ -1251,13 +1251,13 @@ func main() {
12511251 var x int
12521252}
12531253`
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 ) {
12551255 env .OpenFile ("a/main.go" )
12561256 env .Await (
12571257 env .DiagnosticAtRegexp ("main.go" , "x" ),
12581258 )
12591259 })
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 ) {
12611261 env .OpenFile ("a/main.go" )
12621262 env .Await (
12631263 NoDiagnostics ("main.go" ),
@@ -1475,7 +1475,7 @@ package foo_
14751475`
14761476
14771477 withOptions (
1478- WithProxyFiles (proxy ),
1478+ ProxyFiles (proxy ),
14791479 InGOPATH (),
14801480 ).run (t , contents , func (t * testing.T , env * Env ) {
14811481 // Simulate typing character by character.
@@ -1625,7 +1625,7 @@ import (
16251625 EditorConfig {
16261626 Env : map [string ]string {"GO111MODULE" : "off" },
16271627 },
1628- WithModes (Singleton ),
1628+ Modes (Singleton ),
16291629 ).run (t , mod , func (t * testing.T , env * Env ) {
16301630 env .Await (
16311631 env .DiagnosticAtRegexpWithMessage ("main.go" , `"nosuchpkg"` , `cannot find package "nosuchpkg" in any of` ),
@@ -1652,7 +1652,7 @@ package b
16521652 for _ , go111module := range []string {"on" , "auto" } {
16531653 t .Run ("GO111MODULE=" + go111module , func (t * testing.T ) {
16541654 withOptions (
1655- WithModes (Singleton ),
1655+ Modes (Singleton ),
16561656 EditorConfig {
16571657 Env : map [string ]string {
16581658 "GO111MODULE" : go111module ,
@@ -1673,7 +1673,7 @@ package b
16731673 // Expect no warning if GO111MODULE=auto in a directory in GOPATH.
16741674 t .Run ("GOPATH_GO111MODULE_auto" , func (t * testing.T ) {
16751675 withOptions (
1676- WithModes (Singleton ),
1676+ Modes (Singleton ),
16771677 EditorConfig {
16781678 Env : map [string ]string {
16791679 "GO111MODULE" : "auto" ,
@@ -1738,8 +1738,8 @@ package hello
17381738func helloHelper() {}
17391739`
17401740 withOptions (
1741- WithProxyFiles (proxy ),
1742- WithModes (Singleton ),
1741+ ProxyFiles (proxy ),
1742+ Modes (Singleton ),
17431743 ).run (t , nested , func (t * testing.T , env * Env ) {
17441744 // Expect a diagnostic in a nested module.
17451745 env .OpenFile ("nested/hello/hello.go" )
0 commit comments