Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Wiki: document how to fork a package and use that fork in your project #39889
This falls on the edge of proposal and question. I've been working with Go for a couple years now, but I'm still unsure what the recommended workflow is for forking a Go package and using that package in your code. I think documenting this workflow would enable so much more code sharing across the Go community.
To illustrate the problem, I've documented my experience report below as an "experienced gopher" trying to fork https://github.com/evanw/esbuild to expose the parser from
Next, I googled around and learned about
I googled some more but kept finding old articles that either don't use go modules or use other package management tools like glide.
Then I thought that maybe go mod handles this automatically nowadays. So I just forked https://github.com/evanw/esbuild to https://github.com/matthewmueller/esbuild, then tried
This is where I'm at right now. I guess I'll rename all of
I'd love to hear what others do. I'm happy to write something in the wiki once we figure out how to do this. If it's not currently possible, I'd be happy to help make this workflow better. Please let me know!
Thanks for the response @melbahja. I've tried that and wasn't able to get it working. Same errors:
I'm also no longer able to use
What does required mean in this case? Required by
I found it! And it is pretty much documented already! It works without messing with the fork's go.mod or imports, which is really neat.
Then you just run
You need the
Also, I guess the wiki is public, hah. I just added the following note:
Closing. Working as expected and documented.