Open SolarLune opened 4 years ago
Great suggestion. I will do this tonight (if I remember).
This now has been implemented
I believe there's an issue with the go.mod file...
EDIT: OK, I figured out why this wasn't working. You have multiple go.mod
files in your subdirectories. There should only be one, in the base folder for the project. From that point, the folder structure indicates the packages; you specifically should not have multiple go.mod
files in your project.
oooh, from the guide I was following, it suggested to use multiple go mod files. Alright, I will correct this now :)
Can you tell me which guide this is? Maybe it was talking about something else...?
The Current Issue Hello!
Thanks for your work on raylib-goplus; it's definitely a huge step in the right direction to automatically generate new bindings for raylib for Go.
When it comes to actually using raylib-goplus, I believe it would be more idiomatic to use Go Modules to allow projects that use this library to download and import it without having to manually run
go get
, and to make the status of projects that use it reproducible (because it refers to a specific version of a library that is known to work with the project).The Paradigm to Match Instead of running
go get
on a library (raylib-goplus, in this case), just importing it should have Go automatically download and include it in the project'sgo.mod
file, due to the library having thego.mod
file included.The Proposal To fix this, simply initialize a new module with the project's name / URL using
go mod init
and commit it to the root of the module. This will allow recent Go versions to automatically retrieve it from the URL specified, download it, and import it without issue.