1
mirror of https://github.com/rclone/rclone synced 2025-01-03 03:46:24 +01:00

swift: remove unused code (fixes issue reported by the unused linter)

This commit is contained in:
albertony 2023-03-25 23:22:37 +01:00
parent 851ce0f4fe
commit 400d1a4468

View File

@ -8,7 +8,6 @@ import (
"errors"
"fmt"
"io"
"net/url"
"path"
"strconv"
"strings"
@ -1328,23 +1327,6 @@ func (o *Object) removeSegmentsLargeObject(ctx context.Context, containerSegment
return nil
}
func (o *Object) getSegmentsDlo(ctx context.Context) (segmentsContainer string, prefix string, err error) {
if err = o.readMetaData(ctx); err != nil {
return
}
dirManifest := o.headers["X-Object-Manifest"]
dirManifest, err = url.PathUnescape(dirManifest)
if err != nil {
return
}
delimiter := strings.Index(dirManifest, "/")
if len(dirManifest) == 0 || delimiter < 0 {
err = errors.New("missing or wrong structure of manifest of Dynamic large object")
return
}
return dirManifest[:delimiter], dirManifest[delimiter+1:], nil
}
// urlEncode encodes a string so that it is a valid URL
//
// We don't use any of Go's standard methods as we need `/` not