rantav / go-archetype

Project archetyping and templating in Golang
https://go-archetype.dev/
MIT License
48 stars 17 forks source link

Support symlinks and add new template variables 'destination_dir' and 'source_dir' #21

Closed codyaray closed 1 year ago

codyaray commented 1 year ago

Two small fixes here:

  1. support symlinks as well as normal files in templates
  2. add two more template variables, so we don't have to prompt the user to duplicate the repo name
rantav commented 1 year ago

Thank you @codyaray for this contribution!

Is the only motivation for adding source_dir and destination_dir the project name? B/c source and destination already are dirs and that could be confusing.

codyaray commented 1 year ago

Sorry for the delay. I went OOO right after I sent this. :)

Is the only motivation for adding source_dir and destination_dir the project name? B/c source and destination already are dirs and that could be confusing.

I'm open to whatever naming suggestions you have. I chose "dir" in the spirit of dirname but could be more explicit if it helps. The existing source and destination are full paths, not just the dir names.

rantav commented 1 year ago

ok so how about source_dirname or source_basename? it's longer but can prevent confusion

rantav commented 1 year ago

lgtm, thank you @codyaray