update to recent aws package with mod support

This commit is contained in:
Will Norris 2018-09-15 07:54:12 +00:00
parent 9c3cbc1733
commit e3dff050fb
71 changed files with 4964 additions and 726 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
}