Skip to content

Commit b97a922

Browse files
satotakebep
authored andcommitted
Unexport pathEscapeRFC1738
1 parent b814d21 commit b97a922

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/cloudfront.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func (*cloudFrontClient) pathsToInvalidationBatch(ref string, paths ...string) *
102102
}
103103
cfpaths := &cloudfront.Paths{}
104104
for _, p := range paths {
105-
cfpaths.Items = append(cfpaths.Items, aws.String(PathEscapeRFC1738(p)))
105+
cfpaths.Items = append(cfpaths.Items, aws.String(pathEscapeRFC1738(p)))
106106
}
107107

108108
qty := int64(len(paths))

lib/url.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ func shouldEscape(c byte) bool {
1919
return true
2020
}
2121

22-
// PathEscapeRFC1738 escapes the string so it can be safely placed
22+
// pathEscapeRFC1738 escapes the string so it can be safely placed
2323
// inside a URL path segment according to RFC1738.
2424
// Based on golang native implementation of `url.PathEscape`
2525
// https://golang.org/src/net/url/url.go?s=7976:8008#L276
26-
func PathEscapeRFC1738(s string) string {
26+
func pathEscapeRFC1738(s string) string {
2727
spaceCount, hexCount := 0, 0
2828
for i := 0; i < len(s); i++ {
2929
c := s[i]

lib/url_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func TestPathEscapeRFC1738(t *testing.T) {
2828
}
2929

3030
for _, tc := range testCases {
31-
actual := PathEscapeRFC1738(tc.input)
31+
actual := pathEscapeRFC1738(tc.input)
3232
assert.Equal(actual, tc.expected)
3333
}
3434
}

0 commit comments

Comments
 (0)