forked from TrueCloudLab/rclone
vendor: update to latest versions of everything
This commit is contained in:
parent
4415aa5c2e
commit
467fe30a5e
276 changed files with 38996 additions and 14449 deletions
23
vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go
generated
vendored
Normal file
23
vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go
generated
vendored
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue