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

This site uses Akismet to reduce spam. Learn how your comment data is processed.