We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
google#11 opened by @waitingkuo on 4 Jan 2017
How to import libraries when its path contains "." ?
For example, I can import "github.com/labstack/echo" in pure go by
import "github.com/labstack/echo"
In grumpy, I can import it like
from __go__.github.com.labstack.echo import New
But it will be compiled to something like this
import "github/com/labstack/echo"
Anyway to correct this issue?
The text was updated successfully, but these errors were encountered:
Comment by trotterdylan Wednesday Jan 04, 2017 at 21:02 GMT
I think long term I'll need an alternative import syntax for Go imports, like:
from __go__ import "github.com/labstack/echo"
But unfortunately that's not workable at the moment since I'm using the ast module for Python parsing and it won't accept this kind of syntax.
In the short term, perhaps something like:
New = __goimport__("github.com/labstack/echo", "New")
I'll put something together.
Sorry, something went wrong.
Comment by sebgoa Tuesday Jan 10, 2017 at 13:10 GMT
Very dirty but, couldn't you temporarily hack grumpc to just detect .com and don't replace it with a /.
.com
/
I am not familiar with ast, so I am going through the grumpc code now.
but yes , best would be from __go__ import "github.com/labstack/echo"
Comment by S-YOU Tuesday Jan 10, 2017 at 13:22 GMT
golang.org does not include .com, I would suggest putting "github.com" and "golang.org" as special case for the time being.
No branches or pull requests
google#11 opened by @waitingkuo on 4 Jan 2017
How to import libraries when its path contains "." ?
For example, I can import "github.com/labstack/echo" in pure go by
In grumpy, I can import it like
But it will be compiled to something like this
Anyway to correct this issue?
The text was updated successfully, but these errors were encountered: