@@ -118,13 +118,6 @@ func resolveStaticImportPath(importPath string) (*Directory, error) {
118118 VCS : "git" ,
119119 }, nil
120120
121- // The next two cases check for dependencies that actually come from the Go
122- // standard library. This approach to resolving the import paths could link
123- // the user to a newer version of a golang/org/x/ package than what is in use
124- // when go-langserver is released. That's acceptable because we don't support
125- // multiple Go versions, we don't publish which Go version our language server
126- // is using anywhere, and these dependencies are very rare in practive (99% of
127- // users are unlikely to encounter them).
128121 case strings .HasPrefix (importPath , "golang.org/x/" ):
129122 d , err := resolveStaticImportPath (strings .Replace (importPath , "golang.org/x/" , "github.com/golang/" , 1 ))
130123 if err != nil {
@@ -133,7 +126,16 @@ func resolveStaticImportPath(importPath string) (*Directory, error) {
133126 d .ProjectRoot = strings .Replace (d .ProjectRoot , "github.com/golang/" , "golang.org/x/" , 1 )
134127 return d , nil
135128
136- // This is the same as the previous case, except with the `.` replaced with an `_`.
129+ // The next case checks for dependencies that actually come from the Go
130+ // standard library. This approach to resolving the import paths could link
131+ // the user to a newer version of a golang.org/x/ package than what is in use
132+ // when go-langserver is released. That's acceptable because we don't support
133+ // multiple Go versions, we don't publish which Go version our language server
134+ // is using anywhere, and these dependencies are very rare in practice (99% of
135+ // users are unlikely to encounter them).
136+ //
137+ // This is the same as the previous case, except with the `.` replaced with an
138+ // `_`.
137139 case strings .HasPrefix (importPath , "golang_org/x/" ):
138140 d , err := resolveStaticImportPath (strings .Replace (importPath , "golang_org/x/" , "github.com/golang/" , 1 ))
139141 if err != nil {
0 commit comments