Chore/fix lint issues (#27704)
* Chore: Fix linting issues Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -201,9 +201,9 @@ func (c *StorageClient) FileUpload(ctx context.Context, container, blobName stri
|
||||
func escape(content string) string {
|
||||
content = url.QueryEscape(content)
|
||||
// the Azure's behavior uses %20 to represent whitespace instead of + (plus)
|
||||
content = strings.Replace(content, "+", "%20", -1)
|
||||
content = strings.ReplaceAll(content, "+", "%20")
|
||||
// the Azure's behavior uses slash instead of + %2F
|
||||
content = strings.Replace(content, "%2F", "/", -1)
|
||||
content = strings.ReplaceAll(content, "%2F", "/")
|
||||
|
||||
return content
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
const (
|
||||
pngExt = ".png"
|
||||
defaultSGcsSignedUrlExpiration = 7 * 24 * time.Hour //7 days
|
||||
defaultSGcsSignedUrlExpiration = 7 * 24 * time.Hour // 7 days
|
||||
)
|
||||
|
||||
type ImageUploader interface {
|
||||
|
||||
@@ -37,7 +37,7 @@ var netClient = &http.Client{
|
||||
|
||||
func (u *WebdavUploader) PublicURL(filename string) string {
|
||||
if strings.Contains(u.public_url, "${file}") {
|
||||
return strings.Replace(u.public_url, "${file}", filename, -1)
|
||||
return strings.ReplaceAll(u.public_url, "${file}", filename)
|
||||
}
|
||||
|
||||
publicURL, _ := url.Parse(u.public_url)
|
||||
|
||||
Reference in New Issue
Block a user