go-godo / godo

golang build tool in the spirt of rake, gulp
MIT License
536 stars 31 forks source link

Add init subcommand #8

Closed mgutz closed 10 years ago

mgutz commented 10 years ago

godo init should create a simple tasks/Godofile.go if one does not exist.

GeertJohan commented 10 years ago

May I ask, why did you choose for Godofile.go to be in a subdirectory tasks ? Most tooling configuration files such as Vagrantfile, Dockerfile, etc. are in the root of the source tree..

mgutz commented 10 years ago

Golint produces warnings if two packages are in the same directory. Moreover, as tasks become non-trivial supporting .go files are created. I felt it is simpler to just enforce a best practice from the start.

GeertJohan commented 10 years ago

Those are good points. I thought about using build tags but indeed it's better to have the sources separated.. I still feel a bit strange about a folder named 'tasks'.. What do you think about creating a Godofolder or Gododir or Godofiles (still a folder). It would be better identifiable from the projects root, and it also encourages users to think of Godo files as a 'package with tasks', not as a single file.

mgutz commented 10 years ago

I like the idea. tasks was chosen out of habit from using tools like rake, thor and gulp. In order of preference

Which one do you prefer?

GeertJohan commented 10 years ago

I like Gododir the best, it speaks to the imagination when people are used to Foobarfile's.. Maybe we'll even set a trend here; Foobardir's. I'm also thinking that if it would be 'Godotasks', new users could assume that every file in the dir is single task.

GeertJohan commented 10 years ago

But then on the other hand; Godotasks is more descriptive for new users in what the /goal/ for the folder is... without knowing what godo is, a user can properly assume what the files are for... So I'm in doubt.. :frowning:

GeertJohan commented 10 years ago

I think both Godotasks and Gododir are great options. You choose :smile: