Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Can't goto definition if is imported like . "gopkg.in/check.v1" #1321

Closed
DeathPoem opened this issue Nov 6, 2017 · 1 comment
Closed

Can't goto definition if is imported like . "gopkg.in/check.v1" #1321

DeathPoem opened this issue Nov 6, 2017 · 1 comment

Comments

@DeathPoem
Copy link

DeathPoem commented Nov 6, 2017

As stated in title. Can't goto definition for 'Suite' in code like this :

package tests

import (
	"somecustom/suites"
	"testing"

	. "gopkg.in/check.v1"  // would omit package name 
)

var context *suites.SharedContext = suites.NewSharedContext()

// gocheck execute suites sequentially
var _ = Suite(&suites.CreateASuite{Ctx: context})
@DeathPoem DeathPoem changed the title Can't goto definition if package is imported like '. "gopkg.in/check.v1"' Can't goto definition if package is imported like '. "gopkg.in/check.v1"' Nov 6, 2017
@DeathPoem DeathPoem changed the title Can't goto definition if package is imported like '. "gopkg.in/check.v1"' Can't goto definition if is imported like '. "gopkg.in/check.v1"' Nov 6, 2017
@DeathPoem DeathPoem changed the title Can't goto definition if is imported like '. "gopkg.in/check.v1"' Can't goto definition if is imported like '."gopkg.in/check.v1"' Nov 6, 2017
@DeathPoem DeathPoem changed the title Can't goto definition if is imported like '."gopkg.in/check.v1"' Can't goto definition if is imported like '. "gopkg.in/check.v1"' Nov 6, 2017
@DeathPoem DeathPoem changed the title Can't goto definition if is imported like '. "gopkg.in/check.v1"' Can't goto definition if is imported like . "gopkg.in/check.v1" Nov 6, 2017
@ramya-rao-a
Copy link
Contributor

The default tool we use for finding definitions is godef which doesn't support dot imports.
See rogpeppe/godef#19

As a workaround, you can change the setting go.docsTool to gogetdoc which should help

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants