You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A catalog.go file with package catalog so I could import it in my main class.
What did you see instead?
A catalog.go file with package main, which I can't import.
I'm suspecting this has something to do with the fact that the file itself is in package main, but it's not clear from any documentation in the godoc or elsewhere how to actually change this if that's possible.
For context, I was following this guide when trying to integrate this into my project, since this offered a bit more information than the documentation does at present.
cc @mpvl since it seems like you're the maintainer
The text was updated successfully, but these errors were encountered:
In this invocation you're not passing an explicit package name, so presumably gotext is inferring it from the package in the current working directory.
//go:generate generates additional files for the package containing the source file in which the comment appears. If you want to generate source code for ./catalog, then the //go:generate comment belongs in a source file within the catalog subdirectory.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, also the latest commit, since that seems more relevant given this
What operating system and processor architecture are you using (
go env
)?What did you do?
Run go generate with the following code:
You'll also need a file called
locales/es/messages.gotext.json
with the following contents:What did you expect to see?
A catalog.go file with
package catalog
so I could import it in my main class.What did you see instead?
A catalog.go file with
package main
, which I can't import.I'm suspecting this has something to do with the fact that the file itself is in package main, but it's not clear from any documentation in the godoc or elsewhere how to actually change this if that's possible.
For context, I was following this guide when trying to integrate this into my project, since this offered a bit more information than the documentation does at present.
cc @mpvl since it seems like you're the maintainer
The text was updated successfully, but these errors were encountered: