Chore/fix lint issues (#27704)
* Chore: Fix linting issues Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -155,7 +155,7 @@ func (b *BasicDiff) Basic(lines []*JSONLine) []*BasicBlock {
|
||||
b.Block.Changes = append(b.Block.Changes, b.Change)
|
||||
|
||||
default:
|
||||
//ok
|
||||
// ok
|
||||
}
|
||||
|
||||
// otherwise, we're dealing with a change at a deeper level. We
|
||||
|
||||
@@ -243,7 +243,7 @@ func (f *JSONFormatter) processItem(value interface{}, deltas []diff.Delta, posi
|
||||
case *diff.Object:
|
||||
switch value.(type) {
|
||||
case map[string]interface{}:
|
||||
//ok
|
||||
// ok
|
||||
default:
|
||||
return errors.New("Type mismatch")
|
||||
}
|
||||
@@ -268,7 +268,7 @@ func (f *JSONFormatter) processItem(value interface{}, deltas []diff.Delta, posi
|
||||
case *diff.Array:
|
||||
switch value.(type) {
|
||||
case []interface{}:
|
||||
//ok
|
||||
// ok
|
||||
default:
|
||||
return errors.New("Type mismatch")
|
||||
}
|
||||
|
||||
@@ -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