How to fork a go library (my way)

  • Git fork
  • Go mod init if not yet a module
  • Update path to new module github.com/someone/library -> github.com/you/library. This is because the module will continue to look for dependencies in the old path
  • Bump version with a tag (v1.0.0 -> v1.0.1)
  • Push the tag to Git
  • Go mod tidy in any project using the go library

Leave a Reply

Your email address will not be published. Required fields are marked *