goaltools / goal

Goal is a toolkit for high productivity web development in Go language in the spirit of Revel Framework that is built around the concept of code generation.
BSD 2-Clause "Simplified" License
87 stars 3 forks source link

Incorrect import path of a newly generated app #29

Closed ghost closed 8 years ago

ghost commented 8 years ago

The following works as expected:

goal new ./path/to/project/

However, when we are using a full import path (e.g. github.com/alkchr/sample/) but with a slash at the end goal new neither trims it nor complains that the path is not correct. As a result we get incorrect paths inside the app (e.g. github.com/alkchr/sample//assets/handlers).

We need to make sure CleanImport Trims the / both at the beginning and at the end of the path (and add a new test to cover that change).