#Whatever i do , I cannot install a package.
9 messages · Page 1 of 1 (latest)
Could you go more into detail to what you tried and what errors you are facing?
This is the biggest problem i'm facing. when i try to run the program (```
package main
import (
"pixel/pixelgl"
)
func main() {
pixelgl.Run(run)
}
That's what that looks like
Did you use go mod init to set up your project?
That command creates a go.mod file that will hold your project's dependencies.
After that you use go get to use a dependency and write the full path in the import statement.
Usually what I do is start my project with go mod init myprojectname and whenever I want to use a library I plop it in my code as an import and use it, and then go mod tidy will automatically add it to the go.mod file