How to import a module from github repository in another branch

How to import a module from github repository in another branch

i wanna use a module from github, this module is in another branch

im trying to use fyne to create user interfaces in go and i get this error in go run

go run main.go 
Fyne error:  window creation error
Cause: VersionUnavailable: GLX: Failed to create context: GLXBadFBConfig
At: /home/kefd/go/pkg/mod/

i see that if i use the branch develop this problem with opengl is solved, how i can use ?

1 Like

Hi @kefd.

You can manually check out that branch via go get:

go get

(See also Mapping branches and commits to versions in the module spec.)

go.mod then contains a require directive with a generated pseudo-version that maps to the latest commit, e.g.:

require v2.1.2-0.20211031193424-ac6dfb40fa87 // indirect

Thanks for sharing this info this is useful keep it up.

You’ll actually want to keep them out of git, because they tend to be huge (a lot of small files that will make your work with git heavier/slower). The package.json and package-lock.json should be enough for these dependencies to be easily downloaded again.

You can use https// to create a .gitignore file based on the technologies and dev tools you use. If you add “npm” to the list, it will add node_modules to the excluded files.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.