1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-16 00:04:40 +00:00

build: reformat comments to pass go1.19 vet

See: https://go.dev/doc/go1.19#go-doc
This commit is contained in:
Nick Craig-Wood
2022-08-05 16:35:41 +01:00
parent 876f791ecd
commit 6fd9e3d717
93 changed files with 444 additions and 443 deletions

View File

@@ -37,27 +37,29 @@ type Response struct {
// This is a lazy way of decoding the multiple <s:propstat> in the
// response.
//
// The response might look like this
// The response might look like this.
//
// <d:response>
// <d:href>/remote.php/webdav/Nextcloud%20Manual.pdf</d:href>
// <d:propstat>
// <d:prop>
// <d:getlastmodified>Tue, 19 Dec 2017 22:02:36 GMT</d:getlastmodified>
// <d:getcontentlength>4143665</d:getcontentlength>
// <d:resourcetype/>
// <d:getetag>"048d7be4437ff7deeae94db50ff3e209"</d:getetag>
// <d:getcontenttype>application/pdf</d:getcontenttype>
// </d:prop>
// <d:status>HTTP/1.1 200 OK</d:status>
// </d:propstat>
// <d:propstat>
// <d:prop>
// <d:quota-used-bytes/>
// <d:quota-available-bytes/>
// </d:prop>
// <d:status>HTTP/1.1 404 Not Found</d:status>
// </d:propstat>
//
// <d:href>/remote.php/webdav/Nextcloud%20Manual.pdf</d:href>
// <d:propstat>
// <d:prop>
// <d:getlastmodified>Tue, 19 Dec 2017 22:02:36 GMT</d:getlastmodified>
// <d:getcontentlength>4143665</d:getcontentlength>
// <d:resourcetype/>
// <d:getetag>"048d7be4437ff7deeae94db50ff3e209"</d:getetag>
// <d:getcontenttype>application/pdf</d:getcontenttype>
// </d:prop>
// <d:status>HTTP/1.1 200 OK</d:status>
// </d:propstat>
// <d:propstat>
// <d:prop>
// <d:quota-used-bytes/>
// <d:quota-available-bytes/>
// </d:prop>
// <d:status>HTTP/1.1 404 Not Found</d:status>
// </d:propstat>
//
// </d:response>
//
// So we elide the array of <d:propstat> and within that the array of
@@ -127,8 +129,10 @@ type PropValue struct {
// Error is used to describe webdav errors
//
// <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
// <s:exception>Sabre\DAV\Exception\NotFound</s:exception>
// <s:message>File with name Photo could not be located</s:message>
//
// <s:exception>Sabre\DAV\Exception\NotFound</s:exception>
// <s:message>File with name Photo could not be located</s:message>
//
// </d:error>
type Error struct {
Exception string `xml:"exception,omitempty"`
@@ -214,16 +218,18 @@ func (t *Time) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
// Quota is used to read the bytes used and available
//
// <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
// <d:response>
// <d:href>/remote.php/webdav/</d:href>
// <d:propstat>
// <d:prop>
// <d:quota-available-bytes>-3</d:quota-available-bytes>
// <d:quota-used-bytes>376461895</d:quota-used-bytes>
// </d:prop>
// <d:status>HTTP/1.1 200 OK</d:status>
// </d:propstat>
// </d:response>
//
// <d:response>
// <d:href>/remote.php/webdav/</d:href>
// <d:propstat>
// <d:prop>
// <d:quota-available-bytes>-3</d:quota-available-bytes>
// <d:quota-used-bytes>376461895</d:quota-used-bytes>
// </d:prop>
// <d:status>HTTP/1.1 200 OK</d:status>
// </d:propstat>
// </d:response>
//
// </d:multistatus>
type Quota struct {
Available string `xml:"DAV: response>propstat>prop>quota-available-bytes"`

View File

@@ -800,7 +800,7 @@ func (f *Fs) createObject(remote string, modTime time.Time, size int64) (o *Obje
// Put the object
//
// Copy the reader in to the new object which is returned
// Copy the reader in to the new object which is returned.
//
// The new object may have been created if an error is returned
func (f *Fs) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error) {
@@ -975,9 +975,9 @@ func (f *Fs) Precision() time.Duration {
// Copy or Move src to this remote using server-side copy operations.
//
// This is stored with the remote path given
// This is stored with the remote path given.
//
// It returns the destination Object and a possible error
// It returns the destination Object and a possible error.
//
// Will only be called if src.Fs().Name() == f.Name()
//
@@ -1029,9 +1029,9 @@ func (f *Fs) copyOrMove(ctx context.Context, src fs.Object, remote string, metho
// Copy src to this remote using server-side copy operations.
//
// This is stored with the remote path given
// This is stored with the remote path given.
//
// It returns the destination Object and a possible error
// It returns the destination Object and a possible error.
//
// Will only be called if src.Fs().Name() == f.Name()
//
@@ -1051,9 +1051,9 @@ func (f *Fs) Purge(ctx context.Context, dir string) error {
// Move src to this remote using server-side move operations.
//
// This is stored with the remote path given
// This is stored with the remote path given.
//
// It returns the destination Object and a possible error
// It returns the destination Object and a possible error.
//
// Will only be called if src.Fs().Name() == f.Name()
//
@@ -1291,7 +1291,7 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.Read
// Update the object with the contents of the io.Reader, modTime and size
//
// If existing is set then it updates the object rather than creating a new one
// If existing is set then it updates the object rather than creating a new one.
//
// The new object may have been created if an error is returned
func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (err error) {