Go vendor major update modules

920 views Asked by At

In my project there is third party modules that used entire project. It's importing like below

import github.com/username/my-package/v4

This modules is stored in vendor directory like below;

vendor
   - >github.com
         - >username
               - >my-package
                     - >v4
                        . 
                        . 

There is new version of this package with v5 version instead of v4. I should major update.

import github.com/username/my-package/v5

How can i update this major update? I install the latest version but when I go mod vendor nothing happened. New version is not installed the vendor directory and I can't use it. By the way is there a way that I can use both v4 and v5 version cuz i don't want to update all import paths but I'm okay if I have to migrate all paths.

Thank you folks,

0

There are 0 answers