Skip to content

Set custom GOPATH within Intellij #2216

@ruseinov

Description

@ruseinov

I've been trying to work around the 1.5 go vendor experiment by specifying a custom GOPATH within Go Libraries for the project.

Version of plugin is 0.10.749
Problem is, when I disable the checkbox "Use GOPATH from system environment" and add a custom one - I don't have my project included, which does not get fixed by adding it to Project Libraries.

When I add my new vendor path + enable a default GOPATH with a checkbox, even though there is nothing in my original gopath rather than this project - I get all the project code working, and I can dive into other external library's code, but I can't call any methods on objects from these libraries, only package-level methods work.

Basic example would be:

    api := rest.NewApi()
    api.SetApp(router(ctx))

Where SetApp method is not seen by IntelliJ Idea and none of the api object's properties either.

Here's also a screenshot of my setup: http://uploadr.obnovlenie.ru/uploads/lazycoder-2016-01-06-192451.png

And a screenshot of the outcome:
http://uploadr.obnovlenie.ru/uploads/lazycoder-2016-01-06-192528.png

This code does compile and work, also if I remove the vendor folder from the global libraries and add all the libraries contained by it in the gopath - it also works like a charm.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions