jfeliu007 / goplantuml

PlantUML Class Diagram Generator for golang projects
MIT License
1.78k stars 167 forks source link

Newline is not appended to error messages #93

Closed MorrisLaw closed 4 years ago

MorrisLaw commented 4 years ago

Due to how fmt.Errorf() formats strings, unlike fmt.Println(), a newline is not automatically appended to the string. This leads to things like:

e.g. %s is not a directory:

jeremys-macbook:~ jeremymorris$ goplantuml ./some_file.py
usage:
goplantum <DIR>
DIR Must be a valid directory
./some_file.py is not a directoryjeremys-macbook:~ jeremymorris$

e.g. could not find directory %s:

jeremys-macbook:~ jeremymorris$ goplantuml help
usage:
goplantum <DIR>
DIR Must be a valid directory
could not find directory helpjeremys-macbook:~ jeremymorris$

NOTE: Notice the goplantum <DIR> in my examples. That was also in the output, it looks to be a typo.

jfeliu007 commented 4 years ago

Thanks for opening this issue.

jfeliu007 commented 4 years ago

Thanks again. I will mark this as resolved by #96