1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-18 10:02:15 +03:00

bump dependencies

This commit is contained in:
Jesse Duffield
2018-08-25 17:36:16 +10:00
parent 21f6e9ba87
commit 87dc2bcad9
243 changed files with 63741 additions and 0 deletions

View File

@ -0,0 +1,23 @@
package sdkuri
import (
"path"
"strings"
)
// PathJoin will join the elements of the path delimited by the "/"
// character. Similar to path.Join with the exception the trailing "/"
// character is preserved if present.
func PathJoin(elems ...string) string {
if len(elems) == 0 {
return ""
}
hasTrailing := strings.HasSuffix(elems[len(elems)-1], "/")
str := path.Join(elems...)
if hasTrailing && str != "/" {
str += "/"
}
return str
}