You can go to your go.mod file and institute a replace directive.
replace example.com/some/module v1.2.3 => ../local/module
You can target your local repository as opposed to using the remote module.
See the following for more information:
Go Dev Documentation to replace directive