-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
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
goflymake wrongly marking func main() as error #16
Comments
Are these files all in the same directory? In that case, that isn't a valid package, as you'd have multiple conflicting definitions of |
@dominikh, Yup they are, Hmm, how do I arrange those files then? |
A single directory holds a single package. If you want to have a project with many executables, a common structure is something like See for example https://code.google.com/p/go/source/browse/?repo=tools#hg%2Fcmd -- the go.tools repository, which contains a number of utilities. |
+1. I am having a similar problem. In my case, main.go is the only file in my package directory and is also the only file that has a main function. Mouse-hover results in goflymake showing a tool-tip saying "main re-declared in this block". |
A little bit of experimentation and it seems like, if the file is named main.go or has the same name as the pkg directory name for instance if I have a path like: src/github.com/abhat/test_me and I have main() defined in a file called src/github.com/abhat/test_me.go or in a file called src/github.com/abhat/main.go, then goflymake will complain. Are these naming conventions frowned upon by golang? |
In all of my
golang
buffers,goflymake
is marking myfunc main {}
as an error althoughgo run
for that particular file works pretty well.Here's a screenshot of the problem:
Also, my emacs configuration for go is pretty simple:
Also, unlike other actual errors, mouse hover displays information about the respective error, whereas in this case there is no such information.
Am I missing something?
The text was updated successfully, but these errors were encountered: