diff options
author | Albert Nigmatzianov <albertnigma@gmail.com> | 2017-05-07 17:16:36 +0200 |
---|---|---|
committer | Albert Nigmatzianov <albertnigma@gmail.com> | 2017-05-07 17:16:36 +0200 |
commit | 9b080dc62555580b2d8076e0a899eb07016d6692 (patch) | |
tree | e7094fd370a776677d7fc825ca0fd4bc5be6b072 | |
parent | 231c0a7e090e9cc131409c997963f9bffc49204b (diff) |
helpers: Don't clean path twice
Join calls Clean as it says in docs.
Minor performance improvement:
Before:
Average time per operation: 432ms
Average memory allocated per operation: 127322kB
Average allocations per operation: 2138137
After:
Average time per operation: 428ms
Average memory allocated per operation: 127350kB
Average allocations per operation: 2137892
-rw-r--r-- | helpers/path.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helpers/path.go b/helpers/path.go index 554e9977d..d246b57c3 100644 --- a/helpers/path.go +++ b/helpers/path.go @@ -158,7 +158,7 @@ func (p *PathSpec) AbsPathify(inPath string) string { } // TODO(bep): Consider moving workingDir to argument list - return filepath.Clean(filepath.Join(p.workingDir, inPath)) + return filepath.Join(p.workingDir, inPath) } // GetLayoutDirPath returns the absolute path to the layout file dir |