stringer tool doesn't work with more then 3 level nested package
647 views
Skip to first unread message
Robert Zaremba
unread,
Jan 22, 2015, 8:28:51 AM1/22/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
Hi,
I'm trying to use stringer tool with go1.3. However it has problems when it needs to load a package nested in more the 3 other directories (eg when there is import "a/b/c/d") test file: test_stringer.go
When running stringer test_stringer.go -type=PaymentType I'm getting the following error: stringer: checking package: test_stringer.go:5:2: could not import a/b/c/d (can't find import: a/b/c/d)
When running go run test_stringer.go everything works fine. Is it a stringer bug or stringer doesn't work properly with go1.3?
Ringo De Smet
unread,
Feb 2, 2015, 6:51:47 PM2/2/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
Robert,
On Thursday, January 22, 2015 at 2:28:51 PM UTC+1, Robert Zaremba wrote:
Hi,
I'm trying to use stringer tool with go1.3. However it has problems when it needs to load a package nested in more the 3 other directories (eg when there is import "a/b/c/d") test file: test_stringer.go
Did you manage your way around this? I'm bumping into the same problem:
I'm running on a Mac with Go 1.4.1 installed via Homebrew. More info of my environment in the ticket above.
If you still have the problem, can you post your setup/environment to find any correlation?
Ringo
Ringo De Smet
unread,
Feb 2, 2015, 7:52:05 PM2/2/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
Robert,
Seems to be a silly thing: 4 part import are usually subpackages and these must be "installed" before you can use them. I ran the following on the command line to resolve my problem: