R
R
raiboon2015-06-09 15:20:19
go
raiboon, 2015-06-09 15:20:19

How to organize a project in go?

I can't find a detailed best-practices tutorial on organizing a goroutine project.
How to store dependencies?
Where to store build scripts? makefile?
How to split the project into sub-packages (as I understand it, the current directory is not added to GOPATH and you can't just use the package from the neighboring folder?)?
I read that it is recommended to immediately place the application along the path src/github.com/name/project... And also import them in the same way.
What happens if you need to move to another repository? It's not every day, of course, but it happens. What, all source codes to shovel?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artem, 2015-06-09
@raiboon

Alternatively, you can use the structure described in this article . Now the gb tool is still gaining momentum . And there is the classic article " How to Write Go Code ".

A
Andrey K, 2015-06-09
@mututunus

For dependencies I use https://github.com/pote/gpm
Local packages can be imported directly from the current directory (import "./mypackage")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question