V
V
Vladimir Grabko2016-05-21 15:36:04
go
Vladimir Grabko, 2016-05-21 15:36:04

What is the correct way to migrate the codebase to Github?

Previously, I had a Core directory in the src directory, which contained all of my code that I was going to reuse. Now all this is uploaded to github .
It confuses me that I now need to "hard" import packages. It turns
out that if I manually upload my code and put it in the src/Core directory, it won't work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita, 2016-05-21
@VGrabko

Initially, it is recommended to specify github.com/.... as the project directory.

If you keep your code in a source repository somewhere, then you should use the root of that source repository as your base path. For instance, if you have a GitHub account at github.com/user, that should be your base path.
Note that you don't need to publish your code to a remote repository before you can build it. It's just a good habit to organize your code as if you will publish it someday. In practice you can choose any arbitrary path name, as long as it is unique to the standard library and greater Go ecosystem.

https://golang.org/doc/code.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question