I was under the impression that go modules would do that kind of separation.
When creating a module you define the module path. If the project is hosted 
in github, bitbucket or anywhere else should not matter.
when calling go get github.com/user/application you refer just to the path 
where the repo is hosted. the import path should be the module path in the 
go.mod file.
Unfortunatelly i am not that experienced with modules. Is someone more 
experienced in go modules?

On Wednesday, December 12, 2018 at 7:41:57 PM UTC+2, Louki Sumirniy wrote:
>
> I have done this many times. Some repositories are more of a pain than 
> others to move. I was amused to learn after having done this with 
> github.com/btcsuite/btcd, that the btcjson, btcec, btcutil and btclog 
> repos all were separate but quite tightly bound both to each other and it 
> took me about half a day to fix it. Part of my solution was copying those 
> repos, removing the .git folder. I could have rather forked all of them, 
> but those 4 in particular and the main btcd were very tangled and hard to 
> separate.
>
> My opinion is that there should be a simple way to refer to orthogonal 
> repos, and sub-folders, with simple relative paths. So instead of "
> github.com/btcsuite/btcd/blockchain" I can just say "./blockchain" or 
> instead of "github.com/btcsuite/btclog" I can say "../btclog" and the 
> rest is inferred from the module spec and/or gopath location. 
>
> I use Visual Studio Code (it has the best go toolchain integration I am 
> aware of) and its search-in-repository functions are quite good, but it's 
> easy to make a mistake and accidentally cast too wide a net, and the 
> poor-man's-cut-down-for-no-reason regex searching doesn't help either.
>
> It's not difficult, just tedious, and it would be nice if there was 
> relative paths allowed for imports.
>
> On Wednesday, 12 December 2018 13:12:53 UTC+1, Sotirios Mantziaris wrote:
>>
>> Hi,
>>
>> i want to move a repo from my github account to another one. Goal is to 
>> have a new import path for the new forked repository.
>> There are 2 ways of achieving the move:
>>
>>    - Forking
>>    - Transfer repository
>>
>> Is it possible to fork a repo and change the import path of the 
>> repository?
>>
>> If the transfer option is chosen we just have to change all imports in 
>> the code, which severs the ties for the originating project.
>>
>> Is it possible to have:
>>
>>    - both repos
>>    - every repo with it's own import path
>>    - code exchange between them
>>
>> What are the options?
>>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to