Yes you can easily migrate. Go will automatically generate mod files based 
on your projects.

Just go into the project and run 
GO111MODULE=on go mod init <YOUR_PROJECT_NAME>
and everything will be ok.

If you are storing your projects in a VCS like Github just make sure you 
put repo name as the PROJECT NAME

Ex: 
GO111MODULE=on go mod init github.com/username/projectname

For more <https://github.com/golang/go/wiki/Modules#quick-start>

Regards.
Kasun


On Thursday, June 27, 2019 at 11:17:20 AM UTC+5:30, Lee Armstrong wrote:
>
> All of my projects at the moment are living under 
> GOPATH/src/me/projectName.
>
> Is it possible to migrate to using GoModules and pin (for now) the 
> packages at the versions stored in my GOPATH/src.  I am thinking that way 
> the migration to GOMODULES will produce a build no different to the build 
> using GOPATH/src for all the packages.
>
> From that point on I then know I am at a good place and can look to 
> upgrade packages for that migrated project.
>
> Is this possible and if so how?  I am using Go1.12 now but happy if this 
> is in 1.13
>
> Thanks!
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/f9cc55d0-1908-4849-ab9e-f86091ff5576%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to