Ingo Oeser
f1a92ba9fc
Checking via len is more robust
...
because sometimes such APIs return nil slices, sometimes empty slices.
We want nothing to happen in both cases.
2015-08-22 23:52:09 +02:00
Ingo Oeser
d81ea3f35c
filepath love
...
* use filepath to get correct result of file path operation on every OS.
* use filepath.Walk to get a better idea what is being done here
* simpler way to get the basename of a program; also works on Windows
2015-08-22 23:45:53 +02:00
Ingo Oeser
4bf421d848
Use filepath.Join
...
in order to get correct results on windows, too.
2015-08-22 23:08:05 +02:00
Ingo Oeser
8b627dab53
empty filenames don't have a suffix
...
so elide that condition. Even the small speed win is marginal,
since we just called exec before, which is way more expensive.
2015-08-22 22:59:27 +02:00
Ingo Oeser
d06d40e71a
you actully CAN range over nil slices in Go
...
as Go will just handle it like an empty slice.
2015-08-22 22:55:05 +02:00