#Project structure

37 messages · Page 1 of 1 (latest)

wet cliff
#

Do usually you uses Standard Go Project Layout at your projects? is it recommended?

high shard
#

aspects of it

#

dont just make all of those folders just for the sake of following the layout

cunning hull
wet cliff
cunning hull
wet cliff
#

wdym?

cunning hull
# wet cliff wdym?

like does each folder of what is present in the repo contain go files?

solemn spire
gloomy matrixBOT
void skiff
#

It’s just way too much stuff for all of my projects. I don’t follow it at all

#

Make modules when they make sense. Use them to group code. Don’t go crazy

snow ravine
languid vigil
high shard
#

what

#

cmd is for multiple executables

languid vigil
snow ravine
#

it's for executable's name

#

otherwise if someone go install it, it would be named cmd

#

(yes there's ways around it, like not having cmd prefix, or having exec in root instead, but these are situational)

high shard
#

you dont really need the cmd folder unless u want multiple executables

languid vigil
languid vigil
solemn spire
snow ravine
#

yes there's other ways you do not need "cmd" you can just do

go.mod
foo/ <lib
fooer/ <cmd
foobar/ <cmd2
#

cmd is just what people did

#

i do not express support or am against it, i am just mentioning it

solemn spire
#

You don’t even need folders at all
You can have everything in the root directory

languid vigil
#

we can also have multiple execs without a cmd dir, in fact you can do wahtever you want

solemn spire
#

Yes, and that corroborates to the fact that what ftqo said is not a misinformation at all

high shard
#

werent we discussing conventions?

languid vigil
#

Im off this discussion, good luck guys

high shard
#

op, as you can see, theres lots of disagreement with that repo, and thats fine lol

wet cliff
solemn spire
languid vigil