From 555def2da7f425225b9f8657593733b5d71f901e Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Sun, 28 Aug 2022 13:21:57 +0200 Subject: [PATCH] build: add package comments to silence revive linter --- backend/alias/alias.go | 1 + backend/all/all.go | 1 + backend/azureblob/azureblob.go | 3 +-- backend/b2/api/types.go | 1 + backend/b2/b2.go | 2 +- backend/cache/cache.go | 1 + backend/fichier/fichier.go | 1 + backend/googlephotos/api/types.go | 1 + backend/hdfs/hdfs.go | 1 + .../hidrive/hidrivehash/internal/internal.go | 1 + backend/jottacloud/api/types.go | 1 + backend/jottacloud/jottacloud.go | 1 + backend/koofr/koofr.go | 1 + backend/mailru/api/m1.go | 1 + backend/mailru/mailru.go | 1 + backend/onedrive/api/types.go | 3 +-- backend/opendrive/opendrive.go | 1 + backend/putio/putio.go | 1 + backend/qingstor/qingstor.go | 5 ++--- backend/seafile/api/types.go | 1 + backend/seafile/seafile.go | 1 + backend/sftp/sftp.go | 3 +-- backend/sia/api/types.go | 1 + backend/sia/sia.go | 1 + backend/union/policy/all.go | 1 + backend/union/union.go | 1 + backend/union/upstream/upstream.go | 1 + backend/uptobox/api/types.go | 1 + backend/uptobox/uptobox.go | 1 + backend/yandex/api/types.go | 1 + backend/yandex/yandex.go | 1 + backend/zoho/api/types.go | 1 + cmd/about/about.go | 1 + cmd/authorize/authorize.go | 1 + cmd/backend/backend.go | 1 + cmd/cachestats/cachestats.go | 1 + cmd/cat/cat.go | 1 + cmd/check/check.go | 1 + cmd/checksum/checksum.go | 1 + cmd/cleanup/cleanup.go | 1 + cmd/cmount/mount.go | 7 +++--- cmd/cmount/mount_brew.go | 7 +++--- cmd/cmount/mount_test.go | 2 ++ cmd/cmount/mount_unsupported.go | 7 +++--- cmd/config/config.go | 1 + cmd/copy/copy.go | 1 + cmd/copyto/copyto.go | 1 + cmd/copyurl/copyurl.go | 1 + cmd/cryptcheck/cryptcheck.go | 1 + cmd/cryptdecode/cryptdecode.go | 1 + cmd/dedupe/dedupe.go | 1 + cmd/delete/delete.go | 1 + cmd/deletefile/deletefile.go | 1 + cmd/genautocomplete/genautocomplete.go | 1 + cmd/gendocs/gendocs.go | 1 + cmd/hashsum/hashsum.go | 1 + cmd/link/link.go | 1 + cmd/listremotes/listremotes.go | 1 + cmd/ls/ls.go | 1 + cmd/ls/lshelp/lshelp.go | 1 + cmd/lsd/lsd.go | 1 + cmd/lsf/lsf.go | 1 + cmd/lsjson/lsjson.go | 1 + cmd/lsl/lsl.go | 1 + cmd/md5sum/md5sum.go | 1 + cmd/mkdir/mkdir.go | 1 + cmd/mount/mount.go | 3 +-- cmd/mount/mount_unsupported.go | 11 +++++----- cmd/mount2/mount.go | 3 +-- cmd/mount2/mount_unsupported.go | 7 +++--- cmd/mountlib/mount.go | 1 + cmd/move/move.go | 1 + cmd/moveto/moveto.go | 1 + cmd/ncdu/ncdu.go | 3 +-- cmd/obscure/obscure.go | 1 + cmd/purge/purge.go | 1 + cmd/rc/rc.go | 1 + cmd/rcat/rcat.go | 1 + cmd/rcd/rcd.go | 1 + cmd/reveal/reveal.go | 1 + cmd/rmdir/rmdir.go | 1 + cmd/rmdirs/rmdirs.go | 1 + cmd/selfupdate/selfupdate.go | 1 + cmd/serve/dlna/data/data.go | 5 +++-- cmd/serve/dlna/dlna.go | 1 + cmd/serve/dlna/dlnaflags/dlnaflags.go | 1 + cmd/serve/dlna/upnpav/upnpav.go | 1 + cmd/serve/ftp/ftp.go | 3 +-- cmd/serve/http/data/data.go | 5 +++-- cmd/serve/http/http.go | 1 + cmd/serve/httplib/httpflags/httpflags.go | 1 + cmd/serve/serve.go | 1 + cmd/serve/sftp/sftp.go | 3 +-- cmd/settier/settier.go | 1 + cmd/sha1sum/sha1sum.go | 1 + cmd/size/size.go | 1 + cmd/sync/sync.go | 1 + cmd/test/histogram/histogram.go | 1 + cmd/test/info/info.go | 1 + cmd/test/info/internal/build_csv/main.go | 1 + cmd/test/info/internal/internal.go | 1 + cmd/test/memory/memory.go | 1 + cmd/test/test.go | 1 + cmd/touch/touch.go | 1 + cmd/tree/tree.go | 1 + cmd/version/version.go | 1 + fs/chunkedreader/chunkedreader.go | 1 + fs/driveletter/driveletter.go | 3 +-- fs/driveletter/driveletter_windows.go | 1 + fs/hash/hash.go | 1 + fs/rc/jobs/job.go | 3 +-- fs/rc/webgui/plugins.go | 1 + fs/rc/webgui/webgui.go | 3 +-- fstest/mockfs/mockfs.go | 1 + lib/buildinfo/tags.go | 1 + lib/daemonize/daemon_other.go | 3 +-- lib/daemonize/daemon_unix.go | 3 +-- lib/encoder/encoder.go | 22 +++++++++---------- lib/encoder/filename/init.go | 1 + lib/encoder/internal/gen/main.go | 1 + lib/errors/errors.go | 1 + lib/file/preallocate_windows.go | 2 +- lib/http/auth/auth.go | 1 + lib/jwtutil/jwtutil.go | 1 + lib/kv/bolt.go | 1 + lib/mmap/mmap.go | 1 + lib/oauthutil/oauthutil.go | 1 + lib/readers/context.go | 1 + vfs/vfs.go | 5 ++--- vfs/vfscache/downloaders/downloaders.go | 1 + vfs/vfscommon/cachemode.go | 1 + vfs/vfstest/vfs.go | 1 + 132 files changed, 164 insertions(+), 68 deletions(-) diff --git a/backend/alias/alias.go b/backend/alias/alias.go index 33ba5d664..92dda17bf 100644 --- a/backend/alias/alias.go +++ b/backend/alias/alias.go @@ -1,3 +1,4 @@ +// Package alias implements a virtual provider to rename existing remotes. package alias import ( diff --git a/backend/all/all.go b/backend/all/all.go index dc17911e4..5dae4d37d 100644 --- a/backend/all/all.go +++ b/backend/all/all.go @@ -1,3 +1,4 @@ +// Package all imports all the backends package all import ( diff --git a/backend/azureblob/azureblob.go b/backend/azureblob/azureblob.go index edb863070..0db359222 100644 --- a/backend/azureblob/azureblob.go +++ b/backend/azureblob/azureblob.go @@ -1,8 +1,7 @@ -// Package azureblob provides an interface to the Microsoft Azure blob object storage system - //go:build !plan9 && !solaris && !js // +build !plan9,!solaris,!js +// Package azureblob provides an interface to the Microsoft Azure blob object storage system package azureblob import ( diff --git a/backend/b2/api/types.go b/backend/b2/api/types.go index e139dc8c1..5089db242 100644 --- a/backend/b2/api/types.go +++ b/backend/b2/api/types.go @@ -1,3 +1,4 @@ +// Package api provides types used by the Backblaze B2 API. package api import ( diff --git a/backend/b2/b2.go b/backend/b2/b2.go index 6fd77b6a0..52794d802 100644 --- a/backend/b2/b2.go +++ b/backend/b2/b2.go @@ -1,4 +1,4 @@ -// Package b2 provides an interface to the Backblaze B2 object storage system +// Package b2 provides an interface to the Backblaze B2 object storage system. package b2 // FIXME should we remove sha1 checks from here as rclone now supports diff --git a/backend/cache/cache.go b/backend/cache/cache.go index 1c75aea4a..5c4e5dc87 100644 --- a/backend/cache/cache.go +++ b/backend/cache/cache.go @@ -1,6 +1,7 @@ //go:build !plan9 && !js // +build !plan9,!js +// Package cache implements a virtual provider to cache existing remotes. package cache import ( diff --git a/backend/fichier/fichier.go b/backend/fichier/fichier.go index 454e391ff..e6c053051 100644 --- a/backend/fichier/fichier.go +++ b/backend/fichier/fichier.go @@ -1,3 +1,4 @@ +// Package fichier provides an interface to the 1Fichier storage system. package fichier import ( diff --git a/backend/googlephotos/api/types.go b/backend/googlephotos/api/types.go index d26cfc714..9b7aa79f6 100644 --- a/backend/googlephotos/api/types.go +++ b/backend/googlephotos/api/types.go @@ -1,3 +1,4 @@ +// Package api provides types used by the Google Photos API. package api import ( diff --git a/backend/hdfs/hdfs.go b/backend/hdfs/hdfs.go index 234344ece..c07c0d7e2 100644 --- a/backend/hdfs/hdfs.go +++ b/backend/hdfs/hdfs.go @@ -1,6 +1,7 @@ //go:build !plan9 // +build !plan9 +// Package hdfs provides an interface to the HDFS storage system. package hdfs import ( diff --git a/backend/hidrive/hidrivehash/internal/internal.go b/backend/hidrive/hidrivehash/internal/internal.go index f1596a9e6..261233c0d 100644 --- a/backend/hidrive/hidrivehash/internal/internal.go +++ b/backend/hidrive/hidrivehash/internal/internal.go @@ -1,3 +1,4 @@ +// Package internal provides utilities for HiDrive. package internal import ( diff --git a/backend/jottacloud/api/types.go b/backend/jottacloud/api/types.go index 91e0c3095..8daf0f7ad 100644 --- a/backend/jottacloud/api/types.go +++ b/backend/jottacloud/api/types.go @@ -1,3 +1,4 @@ +// Package api provides types used by the Jottacloud API. package api import ( diff --git a/backend/jottacloud/jottacloud.go b/backend/jottacloud/jottacloud.go index 0044c7f79..001787451 100644 --- a/backend/jottacloud/jottacloud.go +++ b/backend/jottacloud/jottacloud.go @@ -1,3 +1,4 @@ +// Package jottacloud provides an interface to the Jottacloud storage system. package jottacloud import ( diff --git a/backend/koofr/koofr.go b/backend/koofr/koofr.go index f893b898b..642ab79fe 100644 --- a/backend/koofr/koofr.go +++ b/backend/koofr/koofr.go @@ -1,3 +1,4 @@ +// Package koofr provides an interface to the Koofr storage system. package koofr import ( diff --git a/backend/mailru/api/m1.go b/backend/mailru/api/m1.go index 039b1e104..c9d3e9c9f 100644 --- a/backend/mailru/api/m1.go +++ b/backend/mailru/api/m1.go @@ -1,3 +1,4 @@ +// Package api provides types used by the Mail.ru API. package api import ( diff --git a/backend/mailru/mailru.go b/backend/mailru/mailru.go index bd527e8e2..95507996c 100644 --- a/backend/mailru/mailru.go +++ b/backend/mailru/mailru.go @@ -1,3 +1,4 @@ +// Package mailru provides an interface to the Mail.ru Cloud storage system. package mailru import ( diff --git a/backend/onedrive/api/types.go b/backend/onedrive/api/types.go index 12dca863b..bfde10161 100644 --- a/backend/onedrive/api/types.go +++ b/backend/onedrive/api/types.go @@ -1,5 +1,4 @@ -// Types passed and returned to and from the API - +// Package api provides types used by the OneDrive API. package api import ( diff --git a/backend/opendrive/opendrive.go b/backend/opendrive/opendrive.go index 35e1871c3..037372e13 100644 --- a/backend/opendrive/opendrive.go +++ b/backend/opendrive/opendrive.go @@ -1,3 +1,4 @@ +// Package opendrive provides an interface to the OpenDrive storage system. package opendrive import ( diff --git a/backend/putio/putio.go b/backend/putio/putio.go index 766a99b77..692364166 100644 --- a/backend/putio/putio.go +++ b/backend/putio/putio.go @@ -1,3 +1,4 @@ +// Package putio provides an interface to the put.io storage system. package putio import ( diff --git a/backend/qingstor/qingstor.go b/backend/qingstor/qingstor.go index cd4880358..a3d0bd639 100644 --- a/backend/qingstor/qingstor.go +++ b/backend/qingstor/qingstor.go @@ -1,9 +1,8 @@ -// Package qingstor provides an interface to QingStor object storage -// Home: https://www.qingcloud.com/ - //go:build !plan9 && !js // +build !plan9,!js +// Package qingstor provides an interface to QingStor object storage +// Home: https://www.qingcloud.com/ package qingstor import ( diff --git a/backend/seafile/api/types.go b/backend/seafile/api/types.go index 9fb95c0cf..d6224709f 100644 --- a/backend/seafile/api/types.go +++ b/backend/seafile/api/types.go @@ -1,3 +1,4 @@ +// Package api provides types used by the Seafile API. package api // Some api objects are duplicated with only small differences, diff --git a/backend/seafile/seafile.go b/backend/seafile/seafile.go index 00457676c..1413544ee 100644 --- a/backend/seafile/seafile.go +++ b/backend/seafile/seafile.go @@ -1,3 +1,4 @@ +// Package seafile provides an interface to the Seafile storage system. package seafile import ( diff --git a/backend/sftp/sftp.go b/backend/sftp/sftp.go index 6a4259542..1c160996c 100644 --- a/backend/sftp/sftp.go +++ b/backend/sftp/sftp.go @@ -1,8 +1,7 @@ -// Package sftp provides a filesystem interface using github.com/pkg/sftp - //go:build !plan9 // +build !plan9 +// Package sftp provides a filesystem interface using github.com/pkg/sftp package sftp import ( diff --git a/backend/sia/api/types.go b/backend/sia/api/types.go index ebec8961e..eb046ab22 100644 --- a/backend/sia/api/types.go +++ b/backend/sia/api/types.go @@ -1,3 +1,4 @@ +// Package api provides types used by the Sia API. package api import ( diff --git a/backend/sia/sia.go b/backend/sia/sia.go index 2a8235638..b86faae61 100644 --- a/backend/sia/sia.go +++ b/backend/sia/sia.go @@ -1,3 +1,4 @@ +// Package sia provides an interface to the Sia storage system. package sia import ( diff --git a/backend/union/policy/all.go b/backend/union/policy/all.go index 1de36da2a..fe43654ff 100644 --- a/backend/union/policy/all.go +++ b/backend/union/policy/all.go @@ -1,3 +1,4 @@ +// Package policy provides utilities for the union implementation. package policy import ( diff --git a/backend/union/union.go b/backend/union/union.go index 8bcbf66c9..7e10f06b8 100644 --- a/backend/union/union.go +++ b/backend/union/union.go @@ -1,3 +1,4 @@ +// Package union implements a virtual provider to join existing remotes. package union import ( diff --git a/backend/union/upstream/upstream.go b/backend/union/upstream/upstream.go index 7b9f44fd2..119eb7bb0 100644 --- a/backend/union/upstream/upstream.go +++ b/backend/union/upstream/upstream.go @@ -1,3 +1,4 @@ +// Package upstream provides utility functionality to union. package upstream import ( diff --git a/backend/uptobox/api/types.go b/backend/uptobox/api/types.go index 872a5cff0..4e842c8ab 100644 --- a/backend/uptobox/api/types.go +++ b/backend/uptobox/api/types.go @@ -1,3 +1,4 @@ +// Package api provides types used by the Uptobox API. package api import "fmt" diff --git a/backend/uptobox/uptobox.go b/backend/uptobox/uptobox.go index 6bc5bd823..fb3bbd7db 100644 --- a/backend/uptobox/uptobox.go +++ b/backend/uptobox/uptobox.go @@ -1,3 +1,4 @@ +// Package uptobox provides an interface to the Uptobox storage system. package uptobox import ( diff --git a/backend/yandex/api/types.go b/backend/yandex/api/types.go index 78d4c6850..614ced7d3 100644 --- a/backend/yandex/api/types.go +++ b/backend/yandex/api/types.go @@ -1,3 +1,4 @@ +// Package api provides types used by the Yandex API. package api import ( diff --git a/backend/yandex/yandex.go b/backend/yandex/yandex.go index 3d5bf53cc..a643a7771 100644 --- a/backend/yandex/yandex.go +++ b/backend/yandex/yandex.go @@ -1,3 +1,4 @@ +// Package yandex provides an interface to the Yandex storage system. package yandex import ( diff --git a/backend/zoho/api/types.go b/backend/zoho/api/types.go index 43d8644ce..755c57b9b 100644 --- a/backend/zoho/api/types.go +++ b/backend/zoho/api/types.go @@ -1,3 +1,4 @@ +// Package api provides types used by the Zoho API. package api import ( diff --git a/cmd/about/about.go b/cmd/about/about.go index 46c1d6f66..967744b59 100644 --- a/cmd/about/about.go +++ b/cmd/about/about.go @@ -1,3 +1,4 @@ +// Package about provides the about command. package about import ( diff --git a/cmd/authorize/authorize.go b/cmd/authorize/authorize.go index d3114c750..87dda815b 100644 --- a/cmd/authorize/authorize.go +++ b/cmd/authorize/authorize.go @@ -1,3 +1,4 @@ +// Package authorize provides the authorize command. package authorize import ( diff --git a/cmd/backend/backend.go b/cmd/backend/backend.go index 85b7e44bd..3199f8a5d 100644 --- a/cmd/backend/backend.go +++ b/cmd/backend/backend.go @@ -1,3 +1,4 @@ +// Package backend provides the backend command. package backend import ( diff --git a/cmd/cachestats/cachestats.go b/cmd/cachestats/cachestats.go index 16a1398d3..7638db8f4 100644 --- a/cmd/cachestats/cachestats.go +++ b/cmd/cachestats/cachestats.go @@ -1,6 +1,7 @@ //go:build !plan9 && !js // +build !plan9,!js +// Package cachestats provides the cachestats command. package cachestats import ( diff --git a/cmd/cat/cat.go b/cmd/cat/cat.go index 4f90f0478..227ddb1f3 100644 --- a/cmd/cat/cat.go +++ b/cmd/cat/cat.go @@ -1,3 +1,4 @@ +// Package cat provides the cat command. package cat import ( diff --git a/cmd/check/check.go b/cmd/check/check.go index 886c36a58..3c126e176 100644 --- a/cmd/check/check.go +++ b/cmd/check/check.go @@ -1,3 +1,4 @@ +// Package check provides the check command. package check import ( diff --git a/cmd/checksum/checksum.go b/cmd/checksum/checksum.go index 1083e3800..c25aa143d 100644 --- a/cmd/checksum/checksum.go +++ b/cmd/checksum/checksum.go @@ -1,3 +1,4 @@ +// Package checksum provides the checksum command. package checksum import ( diff --git a/cmd/cleanup/cleanup.go b/cmd/cleanup/cleanup.go index 549e3b420..e54577466 100644 --- a/cmd/cleanup/cleanup.go +++ b/cmd/cleanup/cleanup.go @@ -1,3 +1,4 @@ +// Package cleanup provides the cleanup command. package cleanup import ( diff --git a/cmd/cmount/mount.go b/cmd/cmount/mount.go index 873adcaf0..c9893f2f7 100644 --- a/cmd/cmount/mount.go +++ b/cmd/cmount/mount.go @@ -1,11 +1,10 @@ -// Package cmount implements a FUSE mounting system for rclone remotes. -// -// This uses the cgo based cgofuse library - //go:build cmount && ((linux && cgo) || (darwin && cgo) || (freebsd && cgo) || windows) // +build cmount // +build linux,cgo darwin,cgo freebsd,cgo windows +// Package cmount implements a FUSE mounting system for rclone remotes. +// +// This uses the cgo based cgofuse library package cmount import ( diff --git a/cmd/cmount/mount_brew.go b/cmd/cmount/mount_brew.go index ec1b97881..964c0b234 100644 --- a/cmd/cmount/mount_brew.go +++ b/cmd/cmount/mount_brew.go @@ -1,9 +1,10 @@ -// Build for macos with the brew tag to handle the absence -// of fuse and print an appropriate error message - //go:build brew && darwin // +build brew,darwin +// Package cmount implements a FUSE mounting system for rclone remotes. +// +// Build for macos with the brew tag to handle the absence +// of fuse and print an appropriate error message package cmount import ( diff --git a/cmd/cmount/mount_test.go b/cmd/cmount/mount_test.go index 542c35b1b..7c9c852f6 100644 --- a/cmd/cmount/mount_test.go +++ b/cmd/cmount/mount_test.go @@ -3,6 +3,8 @@ // +build linux,cgo darwin,cgo freebsd,cgo windows // +build !race !windows +// Package cmount implements a FUSE mounting system for rclone remotes. +// // FIXME this doesn't work with the race detector under Windows either // hanging or producing lots of differences. diff --git a/cmd/cmount/mount_unsupported.go b/cmd/cmount/mount_unsupported.go index 3b6761beb..375cec456 100644 --- a/cmd/cmount/mount_unsupported.go +++ b/cmd/cmount/mount_unsupported.go @@ -1,10 +1,11 @@ -// Build for cmount for unsupported platforms to stop go complaining -// about "no buildable Go source files " - //go:build !((linux && cgo && cmount) || (darwin && cgo && cmount) || (freebsd && cgo && cmount) || (windows && cmount)) // +build !linux !cgo !cmount // +build !darwin !cgo !cmount // +build !freebsd !cgo !cmount // +build !windows !cmount +// Package cmount implements a FUSE mounting system for rclone remotes. +// +// Build for cmount for unsupported platforms to stop go complaining +// about "no buildable Go source files". package cmount diff --git a/cmd/config/config.go b/cmd/config/config.go index ed5700327..318685c7d 100644 --- a/cmd/config/config.go +++ b/cmd/config/config.go @@ -1,3 +1,4 @@ +// Package config provides the config command. package config import ( diff --git a/cmd/copy/copy.go b/cmd/copy/copy.go index 33175e1f7..c6e42a70e 100644 --- a/cmd/copy/copy.go +++ b/cmd/copy/copy.go @@ -1,3 +1,4 @@ +// Package copy provides the copy command. package copy import ( diff --git a/cmd/copyto/copyto.go b/cmd/copyto/copyto.go index 02d2af21e..85b54fa60 100644 --- a/cmd/copyto/copyto.go +++ b/cmd/copyto/copyto.go @@ -1,3 +1,4 @@ +// Package copyto provides the copyto command. package copyto import ( diff --git a/cmd/copyurl/copyurl.go b/cmd/copyurl/copyurl.go index fc3cf38cc..a3c079b11 100644 --- a/cmd/copyurl/copyurl.go +++ b/cmd/copyurl/copyurl.go @@ -1,3 +1,4 @@ +// Package copyurl provides the copyurl command. package copyurl import ( diff --git a/cmd/cryptcheck/cryptcheck.go b/cmd/cryptcheck/cryptcheck.go index ec0597da7..aab50ef06 100644 --- a/cmd/cryptcheck/cryptcheck.go +++ b/cmd/cryptcheck/cryptcheck.go @@ -1,3 +1,4 @@ +// Package cryptcheck provides the cryptcheck command. package cryptcheck import ( diff --git a/cmd/cryptdecode/cryptdecode.go b/cmd/cryptdecode/cryptdecode.go index d36c70ca4..9c6178e9e 100644 --- a/cmd/cryptdecode/cryptdecode.go +++ b/cmd/cryptdecode/cryptdecode.go @@ -1,3 +1,4 @@ +// Package cryptdecode provides the cryptdecode command. package cryptdecode import ( diff --git a/cmd/dedupe/dedupe.go b/cmd/dedupe/dedupe.go index b43c4c279..94a136ca2 100644 --- a/cmd/dedupe/dedupe.go +++ b/cmd/dedupe/dedupe.go @@ -1,3 +1,4 @@ +// Package dedupe provides the dedupe command. package dedupe import ( diff --git a/cmd/delete/delete.go b/cmd/delete/delete.go index a432dbe56..047c320af 100644 --- a/cmd/delete/delete.go +++ b/cmd/delete/delete.go @@ -1,3 +1,4 @@ +// Package delete provides the delete command. package delete import ( diff --git a/cmd/deletefile/deletefile.go b/cmd/deletefile/deletefile.go index 88750c75e..9d222771d 100644 --- a/cmd/deletefile/deletefile.go +++ b/cmd/deletefile/deletefile.go @@ -1,3 +1,4 @@ +// Package deletefile provides the deletefile command. package deletefile import ( diff --git a/cmd/genautocomplete/genautocomplete.go b/cmd/genautocomplete/genautocomplete.go index 597113577..9502bbbc9 100644 --- a/cmd/genautocomplete/genautocomplete.go +++ b/cmd/genautocomplete/genautocomplete.go @@ -1,3 +1,4 @@ +// Package genautocomplete provides the genautocomplete command. package genautocomplete import ( diff --git a/cmd/gendocs/gendocs.go b/cmd/gendocs/gendocs.go index 7a7ef3f46..e80b8a924 100644 --- a/cmd/gendocs/gendocs.go +++ b/cmd/gendocs/gendocs.go @@ -1,3 +1,4 @@ +// Package gendocs provides the gendocs command. package gendocs import ( diff --git a/cmd/hashsum/hashsum.go b/cmd/hashsum/hashsum.go index 64dfde4ce..5655fdcf2 100644 --- a/cmd/hashsum/hashsum.go +++ b/cmd/hashsum/hashsum.go @@ -1,3 +1,4 @@ +// Package hashsum provides the hashsum command. package hashsum import ( diff --git a/cmd/link/link.go b/cmd/link/link.go index 3367178c5..a0356cd33 100644 --- a/cmd/link/link.go +++ b/cmd/link/link.go @@ -1,3 +1,4 @@ +// Package link provides the link command. package link import ( diff --git a/cmd/listremotes/listremotes.go b/cmd/listremotes/listremotes.go index 908979a4f..bf7b697f2 100644 --- a/cmd/listremotes/listremotes.go +++ b/cmd/listremotes/listremotes.go @@ -1,3 +1,4 @@ +// Package ls provides the ls command. package ls import ( diff --git a/cmd/ls/ls.go b/cmd/ls/ls.go index e08a2c21d..334b12f8e 100644 --- a/cmd/ls/ls.go +++ b/cmd/ls/ls.go @@ -1,3 +1,4 @@ +// Package ls provides the ls command. package ls import ( diff --git a/cmd/ls/lshelp/lshelp.go b/cmd/ls/lshelp/lshelp.go index f4a678be2..897c22f1c 100644 --- a/cmd/ls/lshelp/lshelp.go +++ b/cmd/ls/lshelp/lshelp.go @@ -1,3 +1,4 @@ +// Package lshelp provides common help for list commands. package lshelp import ( diff --git a/cmd/lsd/lsd.go b/cmd/lsd/lsd.go index bd723daad..8d79266fb 100644 --- a/cmd/lsd/lsd.go +++ b/cmd/lsd/lsd.go @@ -1,3 +1,4 @@ +// Package lsd provides the lsd command. package lsd import ( diff --git a/cmd/lsf/lsf.go b/cmd/lsf/lsf.go index e370f930c..2651e90e7 100644 --- a/cmd/lsf/lsf.go +++ b/cmd/lsf/lsf.go @@ -1,3 +1,4 @@ +// Package lsf provides the lsf command. package lsf import ( diff --git a/cmd/lsjson/lsjson.go b/cmd/lsjson/lsjson.go index 8e4e343da..eb30f8578 100644 --- a/cmd/lsjson/lsjson.go +++ b/cmd/lsjson/lsjson.go @@ -1,3 +1,4 @@ +// Package lsjson provides the lsjson command. package lsjson import ( diff --git a/cmd/lsl/lsl.go b/cmd/lsl/lsl.go index f2f40f7a7..f8108c5f7 100644 --- a/cmd/lsl/lsl.go +++ b/cmd/lsl/lsl.go @@ -1,3 +1,4 @@ +// Package lsl provides the lsl command. package lsl import ( diff --git a/cmd/md5sum/md5sum.go b/cmd/md5sum/md5sum.go index 665ae4467..09da8526f 100644 --- a/cmd/md5sum/md5sum.go +++ b/cmd/md5sum/md5sum.go @@ -1,3 +1,4 @@ +// Package md5sum provides the md5sum command. package md5sum import ( diff --git a/cmd/mkdir/mkdir.go b/cmd/mkdir/mkdir.go index 33fa33667..3c99180fe 100644 --- a/cmd/mkdir/mkdir.go +++ b/cmd/mkdir/mkdir.go @@ -1,3 +1,4 @@ +// Package mkdir provides the mkdir command. package mkdir import ( diff --git a/cmd/mount/mount.go b/cmd/mount/mount.go index db0f23bd3..765419df4 100644 --- a/cmd/mount/mount.go +++ b/cmd/mount/mount.go @@ -1,8 +1,7 @@ -// Package mount implements a FUSE mounting system for rclone remotes. - //go:build linux || freebsd // +build linux freebsd +// Package mount implements a FUSE mounting system for rclone remotes. package mount import ( diff --git a/cmd/mount/mount_unsupported.go b/cmd/mount/mount_unsupported.go index cc5ccb628..84f8656dc 100644 --- a/cmd/mount/mount_unsupported.go +++ b/cmd/mount/mount_unsupported.go @@ -1,9 +1,10 @@ -// Build for mount for unsupported platforms to stop go complaining -// about "no buildable Go source files " - -// Invert the build constraint: linux freebsd - //go:build !linux && !freebsd // +build !linux,!freebsd +// Package mount implements a FUSE mounting system for rclone remotes. +// +// Build for mount for unsupported platforms to stop go complaining +// about "no buildable Go source files". +// +// Invert the build constraint: linux freebsd package mount diff --git a/cmd/mount2/mount.go b/cmd/mount2/mount.go index d33f44533..cbb890500 100644 --- a/cmd/mount2/mount.go +++ b/cmd/mount2/mount.go @@ -1,8 +1,7 @@ -// Package mount implements a FUSE mounting system for rclone remotes. - //go:build linux || (darwin && amd64) // +build linux darwin,amd64 +// Package mount2 implements a FUSE mounting system for rclone remotes. package mount2 import ( diff --git a/cmd/mount2/mount_unsupported.go b/cmd/mount2/mount_unsupported.go index 975a25b3e..649eab0a2 100644 --- a/cmd/mount2/mount_unsupported.go +++ b/cmd/mount2/mount_unsupported.go @@ -1,8 +1,9 @@ -// Build for mount for unsupported platforms to stop go complaining -// about "no buildable Go source files " - //go:build !linux && (!darwin || !amd64) // +build !linux // +build !darwin !amd64 +// Package mount2 implements a FUSE mounting system for rclone remotes. +// +// Build for mount for unsupported platforms to stop go complaining +// about "no buildable Go source files". package mount2 diff --git a/cmd/mountlib/mount.go b/cmd/mountlib/mount.go index b0119dc12..ba3773e5c 100644 --- a/cmd/mountlib/mount.go +++ b/cmd/mountlib/mount.go @@ -1,3 +1,4 @@ +// Package mountlib provides the mount command. package mountlib import ( diff --git a/cmd/move/move.go b/cmd/move/move.go index 3d7f87167..65c8adc23 100644 --- a/cmd/move/move.go +++ b/cmd/move/move.go @@ -1,3 +1,4 @@ +// Package move provides the move command. package move import ( diff --git a/cmd/moveto/moveto.go b/cmd/moveto/moveto.go index 8d81bb3d3..698d7ee18 100644 --- a/cmd/moveto/moveto.go +++ b/cmd/moveto/moveto.go @@ -1,3 +1,4 @@ +// Package moveto provides the moveto command. package moveto import ( diff --git a/cmd/ncdu/ncdu.go b/cmd/ncdu/ncdu.go index abb748b6d..02427fb49 100644 --- a/cmd/ncdu/ncdu.go +++ b/cmd/ncdu/ncdu.go @@ -1,8 +1,7 @@ -// Package ncdu implements a text based user interface for exploring a remote - //go:build !plan9 && !js // +build !plan9,!js +// Package ncdu implements a text based user interface for exploring a remote package ncdu import ( diff --git a/cmd/obscure/obscure.go b/cmd/obscure/obscure.go index d26f1d72b..08cf8a06a 100644 --- a/cmd/obscure/obscure.go +++ b/cmd/obscure/obscure.go @@ -1,3 +1,4 @@ +// Package obscure provides the obscure command. package obscure import ( diff --git a/cmd/purge/purge.go b/cmd/purge/purge.go index 335615cf9..d41e22cf6 100644 --- a/cmd/purge/purge.go +++ b/cmd/purge/purge.go @@ -1,3 +1,4 @@ +// Package purge provides the purge command. package purge import ( diff --git a/cmd/rc/rc.go b/cmd/rc/rc.go index 53e8697d8..93c2e319e 100644 --- a/cmd/rc/rc.go +++ b/cmd/rc/rc.go @@ -1,3 +1,4 @@ +// Package rc provides the rc command. package rc import ( diff --git a/cmd/rcat/rcat.go b/cmd/rcat/rcat.go index f082fa95d..c7766265d 100644 --- a/cmd/rcat/rcat.go +++ b/cmd/rcat/rcat.go @@ -1,3 +1,4 @@ +// Package rcat provides the rcat command. package rcat import ( diff --git a/cmd/rcd/rcd.go b/cmd/rcd/rcd.go index cc4be57f9..940c300a6 100644 --- a/cmd/rcd/rcd.go +++ b/cmd/rcd/rcd.go @@ -1,3 +1,4 @@ +// Package rcd provides the rcd command. package rcd import ( diff --git a/cmd/reveal/reveal.go b/cmd/reveal/reveal.go index 817dd92dd..e569a26b4 100644 --- a/cmd/reveal/reveal.go +++ b/cmd/reveal/reveal.go @@ -1,3 +1,4 @@ +// Package reveal provides the reveal command. package reveal import ( diff --git a/cmd/rmdir/rmdir.go b/cmd/rmdir/rmdir.go index 9b532ca47..778315be8 100644 --- a/cmd/rmdir/rmdir.go +++ b/cmd/rmdir/rmdir.go @@ -1,3 +1,4 @@ +// Package rmdir provides the rmdir command. package rmdir import ( diff --git a/cmd/rmdirs/rmdirs.go b/cmd/rmdirs/rmdirs.go index 41788c527..11a09ca20 100644 --- a/cmd/rmdirs/rmdirs.go +++ b/cmd/rmdirs/rmdirs.go @@ -1,3 +1,4 @@ +// Package rmdir provides the rmdir command. package rmdir import ( diff --git a/cmd/selfupdate/selfupdate.go b/cmd/selfupdate/selfupdate.go index 5bfd1cb66..ab24290b3 100644 --- a/cmd/selfupdate/selfupdate.go +++ b/cmd/selfupdate/selfupdate.go @@ -1,6 +1,7 @@ //go:build !noselfupdate // +build !noselfupdate +// Package selfupdate provides the selfupdate command. package selfupdate import ( diff --git a/cmd/serve/dlna/data/data.go b/cmd/serve/dlna/data/data.go index 8e142b99f..a5a92880c 100644 --- a/cmd/serve/dlna/data/data.go +++ b/cmd/serve/dlna/data/data.go @@ -1,6 +1,7 @@ -//go:generate go run assets_generate.go +// Package data provides utilities for DLNA server. // The "go:generate" directive compiles static assets by running assets_generate.go - +// +//go:generate go run assets_generate.go package data import ( diff --git a/cmd/serve/dlna/dlna.go b/cmd/serve/dlna/dlna.go index da6a08a19..c36e492d7 100644 --- a/cmd/serve/dlna/dlna.go +++ b/cmd/serve/dlna/dlna.go @@ -1,3 +1,4 @@ +// Package dlna provides DLNA server. package dlna import ( diff --git a/cmd/serve/dlna/dlnaflags/dlnaflags.go b/cmd/serve/dlna/dlnaflags/dlnaflags.go index 06ea27a19..85a1347dc 100644 --- a/cmd/serve/dlna/dlnaflags/dlnaflags.go +++ b/cmd/serve/dlna/dlnaflags/dlnaflags.go @@ -1,3 +1,4 @@ +// Package dlnaflags provides utility functionality to DLNA. package dlnaflags import ( diff --git a/cmd/serve/dlna/upnpav/upnpav.go b/cmd/serve/dlna/upnpav/upnpav.go index 5ac5e17b7..c6dc9dc4f 100644 --- a/cmd/serve/dlna/upnpav/upnpav.go +++ b/cmd/serve/dlna/upnpav/upnpav.go @@ -1,3 +1,4 @@ +// Package upnpav provides utilities for DLNA server. package upnpav import ( diff --git a/cmd/serve/ftp/ftp.go b/cmd/serve/ftp/ftp.go index 11753e42f..08cca77f3 100644 --- a/cmd/serve/ftp/ftp.go +++ b/cmd/serve/ftp/ftp.go @@ -1,8 +1,7 @@ -// Package ftp implements an FTP server for rclone - //go:build !plan9 // +build !plan9 +// Package ftp implements an FTP server for rclone package ftp import ( diff --git a/cmd/serve/http/data/data.go b/cmd/serve/http/data/data.go index 73f6a1ff2..075acf8b7 100644 --- a/cmd/serve/http/data/data.go +++ b/cmd/serve/http/data/data.go @@ -1,6 +1,7 @@ -//go:generate go run assets_generate.go +// Package data provides common functionality for http servers // The "go:generate" directive compiles static assets by running assets_generate.go - +// +//go:generate go run assets_generate.go package data import ( diff --git a/cmd/serve/http/http.go b/cmd/serve/http/http.go index 8712f8ac8..cdf8afd28 100644 --- a/cmd/serve/http/http.go +++ b/cmd/serve/http/http.go @@ -1,3 +1,4 @@ +// Package http provides common functionality for http servers package http import ( diff --git a/cmd/serve/httplib/httpflags/httpflags.go b/cmd/serve/httplib/httpflags/httpflags.go index 899482b7f..109604f0e 100644 --- a/cmd/serve/httplib/httpflags/httpflags.go +++ b/cmd/serve/httplib/httpflags/httpflags.go @@ -1,3 +1,4 @@ +// Package httpflags provides utility functionality to HTTP. package httpflags import ( diff --git a/cmd/serve/serve.go b/cmd/serve/serve.go index 848cb24bb..f79162c82 100644 --- a/cmd/serve/serve.go +++ b/cmd/serve/serve.go @@ -1,3 +1,4 @@ +// Package serve provides the serve command. package serve import ( diff --git a/cmd/serve/sftp/sftp.go b/cmd/serve/sftp/sftp.go index c77450a5e..1a7b7717c 100644 --- a/cmd/serve/sftp/sftp.go +++ b/cmd/serve/sftp/sftp.go @@ -1,8 +1,7 @@ -// Package sftp implements an SFTP server to serve an rclone VFS - //go:build !plan9 // +build !plan9 +// Package sftp implements an SFTP server to serve an rclone VFS package sftp import ( diff --git a/cmd/settier/settier.go b/cmd/settier/settier.go index 6be1c1c6a..8a1d234f0 100644 --- a/cmd/settier/settier.go +++ b/cmd/settier/settier.go @@ -1,3 +1,4 @@ +// Package settier provides the settier command. package settier import ( diff --git a/cmd/sha1sum/sha1sum.go b/cmd/sha1sum/sha1sum.go index 1c3115a8b..25badd19c 100644 --- a/cmd/sha1sum/sha1sum.go +++ b/cmd/sha1sum/sha1sum.go @@ -1,3 +1,4 @@ +// Package sha1sum provides the sha1sum command. package sha1sum import ( diff --git a/cmd/size/size.go b/cmd/size/size.go index 5ed51c7a6..c084de527 100644 --- a/cmd/size/size.go +++ b/cmd/size/size.go @@ -1,3 +1,4 @@ +// Package size provides the size command. package size import ( diff --git a/cmd/sync/sync.go b/cmd/sync/sync.go index be233cdd9..33a5b0027 100644 --- a/cmd/sync/sync.go +++ b/cmd/sync/sync.go @@ -1,3 +1,4 @@ +// Package sync provides the sync command. package sync import ( diff --git a/cmd/test/histogram/histogram.go b/cmd/test/histogram/histogram.go index d4f02d5d9..a3a2865b8 100644 --- a/cmd/test/histogram/histogram.go +++ b/cmd/test/histogram/histogram.go @@ -1,3 +1,4 @@ +// Package histogram provides the histogram test command. package histogram import ( diff --git a/cmd/test/info/info.go b/cmd/test/info/info.go index c4eef5f04..89cc10a01 100644 --- a/cmd/test/info/info.go +++ b/cmd/test/info/info.go @@ -1,3 +1,4 @@ +// Package info provides the info test command. package info // FIXME once translations are implemented will need a no-escape diff --git a/cmd/test/info/internal/build_csv/main.go b/cmd/test/info/internal/build_csv/main.go index 96aa20a19..fbabe5b85 100644 --- a/cmd/test/info/internal/build_csv/main.go +++ b/cmd/test/info/internal/build_csv/main.go @@ -1,3 +1,4 @@ +// Package main provides utilities for the info test command. package main import ( diff --git a/cmd/test/info/internal/internal.go b/cmd/test/info/internal/internal.go index 663662904..7af06b87a 100644 --- a/cmd/test/info/internal/internal.go +++ b/cmd/test/info/internal/internal.go @@ -1,3 +1,4 @@ +// Package internal provides internal implementation for the info test command. package internal import ( diff --git a/cmd/test/memory/memory.go b/cmd/test/memory/memory.go index 551723258..38b7b1683 100644 --- a/cmd/test/memory/memory.go +++ b/cmd/test/memory/memory.go @@ -1,3 +1,4 @@ +// Package memory provides the memory test command. package memory import ( diff --git a/cmd/test/test.go b/cmd/test/test.go index 39f5ccb29..774bf6c3a 100644 --- a/cmd/test/test.go +++ b/cmd/test/test.go @@ -1,3 +1,4 @@ +// Package test provides the test command. package test import ( diff --git a/cmd/touch/touch.go b/cmd/touch/touch.go index 741c920b3..9f3d69b14 100644 --- a/cmd/touch/touch.go +++ b/cmd/touch/touch.go @@ -1,3 +1,4 @@ +// Package touch provides the touch command. package touch import ( diff --git a/cmd/tree/tree.go b/cmd/tree/tree.go index 2528d9dc2..5705dcec8 100644 --- a/cmd/tree/tree.go +++ b/cmd/tree/tree.go @@ -1,3 +1,4 @@ +// Package tree provides the tree command. package tree import ( diff --git a/cmd/version/version.go b/cmd/version/version.go index 3ec69e135..25a17aa41 100644 --- a/cmd/version/version.go +++ b/cmd/version/version.go @@ -1,3 +1,4 @@ +// Package version provides the version command. package version import ( diff --git a/fs/chunkedreader/chunkedreader.go b/fs/chunkedreader/chunkedreader.go index 1e29ea736..66cf666d2 100644 --- a/fs/chunkedreader/chunkedreader.go +++ b/fs/chunkedreader/chunkedreader.go @@ -1,3 +1,4 @@ +// Package chunkedreader provides functionality for reading in chunks. package chunkedreader import ( diff --git a/fs/driveletter/driveletter.go b/fs/driveletter/driveletter.go index 0a683509e..0c02f3976 100644 --- a/fs/driveletter/driveletter.go +++ b/fs/driveletter/driveletter.go @@ -1,8 +1,7 @@ -// Package driveletter returns whether a name is a valid drive letter - //go:build !windows // +build !windows +// Package driveletter returns whether a name is a valid drive letter package driveletter // IsDriveLetter returns a bool indicating whether name is a valid diff --git a/fs/driveletter/driveletter_windows.go b/fs/driveletter/driveletter_windows.go index 40ca94d43..f8b506a80 100644 --- a/fs/driveletter/driveletter_windows.go +++ b/fs/driveletter/driveletter_windows.go @@ -1,6 +1,7 @@ //go:build windows // +build windows +// Package driveletter returns whether a name is a valid drive letter package driveletter // IsDriveLetter returns a bool indicating whether name is a valid diff --git a/fs/hash/hash.go b/fs/hash/hash.go index 93b1de3b2..4540b40cf 100644 --- a/fs/hash/hash.go +++ b/fs/hash/hash.go @@ -1,3 +1,4 @@ +// Package hash provides hash utilities for Fs. package hash import ( diff --git a/fs/rc/jobs/job.go b/fs/rc/jobs/job.go index cb3aaa833..613093e25 100644 --- a/fs/rc/jobs/job.go +++ b/fs/rc/jobs/job.go @@ -1,5 +1,4 @@ -// Manage background jobs that the rc is running - +// Package jobs manages background jobs that the rc is running. package jobs import ( diff --git a/fs/rc/webgui/plugins.go b/fs/rc/webgui/plugins.go index a6730aacb..23f9692c2 100644 --- a/fs/rc/webgui/plugins.go +++ b/fs/rc/webgui/plugins.go @@ -1,3 +1,4 @@ +// Package webgui provides plugin functionality to the Web GUI. package webgui import ( diff --git a/fs/rc/webgui/webgui.go b/fs/rc/webgui/webgui.go index 8153024d1..ee05730f7 100644 --- a/fs/rc/webgui/webgui.go +++ b/fs/rc/webgui/webgui.go @@ -1,5 +1,4 @@ -// Define the Web GUI helpers - +// Package webgui defines the Web GUI helpers. package webgui import ( diff --git a/fstest/mockfs/mockfs.go b/fstest/mockfs/mockfs.go index fe73db5ca..62489c2f6 100644 --- a/fstest/mockfs/mockfs.go +++ b/fstest/mockfs/mockfs.go @@ -1,3 +1,4 @@ +// Package mockfs provides mock Fs for testing. package mockfs import ( diff --git a/lib/buildinfo/tags.go b/lib/buildinfo/tags.go index 6e61a457d..945a1e445 100644 --- a/lib/buildinfo/tags.go +++ b/lib/buildinfo/tags.go @@ -1,3 +1,4 @@ +// Package buildinfo provides build information. package buildinfo import ( diff --git a/lib/daemonize/daemon_other.go b/lib/daemonize/daemon_other.go index 788d034e0..a0781d453 100644 --- a/lib/daemonize/daemon_other.go +++ b/lib/daemonize/daemon_other.go @@ -1,8 +1,7 @@ -// Daemonization stub for non-Unix platforms (implementation) - //go:build windows || plan9 || js // +build windows plan9 js +// Package daemonize provides daemonization stub for non-Unix platforms. package daemonize import ( diff --git a/lib/daemonize/daemon_unix.go b/lib/daemonize/daemon_unix.go index beb89f7ac..1fcb2c55c 100644 --- a/lib/daemonize/daemon_unix.go +++ b/lib/daemonize/daemon_unix.go @@ -1,8 +1,7 @@ -// Daemonization interface for Unix platforms (implementation) - //go:build !windows && !plan9 && !js // +build !windows,!plan9,!js +// Package daemonize provides daemonization interface for Unix platforms. package daemonize import ( diff --git a/lib/encoder/encoder.go b/lib/encoder/encoder.go index d50a2fcfe..a14d7c848 100644 --- a/lib/encoder/encoder.go +++ b/lib/encoder/encoder.go @@ -1,15 +1,13 @@ -/* -Translate file names for usage on restrictive storage systems - -The restricted set of characters are mapped to a unicode equivalent version -(most to their FULLWIDTH variant) to increase compatibility with other -storage systems. -See: http://unicode-search.net/unicode-namesearch.pl?term=FULLWIDTH - -Encoders will also quote reserved characters to differentiate between -the raw and encoded forms. -*/ - +// Package encoder provides functionality to translate file names +// for usage on restrictive storage systems. +// +// The restricted set of characters are mapped to a unicode equivalent version +// (most to their FULLWIDTH variant) to increase compatibility with other +// storage systems. +// See: http://unicode-search.net/unicode-namesearch.pl?term=FULLWIDTH +// +// Encoders will also quote reserved characters to differentiate between +// the raw and encoded forms. package encoder import ( diff --git a/lib/encoder/filename/init.go b/lib/encoder/filename/init.go index 0cbc53c3c..ea206cb9e 100644 --- a/lib/encoder/filename/init.go +++ b/lib/encoder/filename/init.go @@ -1,3 +1,4 @@ +// Package filename provides utilities for encoder. package filename import ( diff --git a/lib/encoder/internal/gen/main.go b/lib/encoder/internal/gen/main.go index a94c37935..97bcb32ba 100644 --- a/lib/encoder/internal/gen/main.go +++ b/lib/encoder/internal/gen/main.go @@ -1,3 +1,4 @@ +// Package main provides utilities for encoder. package main import ( diff --git a/lib/errors/errors.go b/lib/errors/errors.go index 68238521e..ed848cbd6 100644 --- a/lib/errors/errors.go +++ b/lib/errors/errors.go @@ -1,3 +1,4 @@ +// Package errors provides error handling utilites. package errors import ( diff --git a/lib/file/preallocate_windows.go b/lib/file/preallocate_windows.go index 49352356a..39955092e 100644 --- a/lib/file/preallocate_windows.go +++ b/lib/file/preallocate_windows.go @@ -92,7 +92,7 @@ func PreAllocate(size int64, out *os.File) error { } const ( - FSCTL_SET_SPARSE = 0x000900c4 + FSCTL_SET_SPARSE = 0x000900c4 // Control code to set or clears the FILE_ATTRIBUTE_SPARSE_FILE attribute of a file. ) // SetSparseImplemented is a constant indicating whether the diff --git a/lib/http/auth/auth.go b/lib/http/auth/auth.go index e30ee9383..db50c8a30 100644 --- a/lib/http/auth/auth.go +++ b/lib/http/auth/auth.go @@ -1,3 +1,4 @@ +// Package auth provides authentication for http. package auth import ( diff --git a/lib/jwtutil/jwtutil.go b/lib/jwtutil/jwtutil.go index af99ed3f8..583036be9 100644 --- a/lib/jwtutil/jwtutil.go +++ b/lib/jwtutil/jwtutil.go @@ -1,3 +1,4 @@ +// Package jwtutil provides JWT utilities. package jwtutil import ( diff --git a/lib/kv/bolt.go b/lib/kv/bolt.go index 5f9f3d7a6..6fcfe49dd 100644 --- a/lib/kv/bolt.go +++ b/lib/kv/bolt.go @@ -1,6 +1,7 @@ //go:build !plan9 && !js // +build !plan9,!js +// Package kv provides key/value database. package kv import ( diff --git a/lib/mmap/mmap.go b/lib/mmap/mmap.go index 719bcf816..4f323c938 100644 --- a/lib/mmap/mmap.go +++ b/lib/mmap/mmap.go @@ -1,3 +1,4 @@ +// Package mmap provides memory mapped related utilities. package mmap import "os" diff --git a/lib/oauthutil/oauthutil.go b/lib/oauthutil/oauthutil.go index 350fe1671..a7326e886 100644 --- a/lib/oauthutil/oauthutil.go +++ b/lib/oauthutil/oauthutil.go @@ -1,3 +1,4 @@ +// Package oauthutil provides OAuth utilities. package oauthutil import ( diff --git a/lib/readers/context.go b/lib/readers/context.go index 6af6efbaf..177b18809 100644 --- a/lib/readers/context.go +++ b/lib/readers/context.go @@ -1,3 +1,4 @@ +// Package readers provides io.Reader related utilities. package readers import ( diff --git a/vfs/vfs.go b/vfs/vfs.go index b6dc141b3..77ccdf499 100644 --- a/vfs/vfs.go +++ b/vfs/vfs.go @@ -10,15 +10,14 @@ // may be referred to as "". However Stat strips slashes so you can // use paths with slashes in. // -// It also includes directory caching +// # It also includes directory caching // // The vfs package returns Error values to signal precisely which // error conditions have ocurred. It may also return general errors // it receives. It tries to use os Error values (e.g. os.ErrExist) // where possible. - +// //go:generate sh -c "go run make_open_tests.go | gofmt > open_test.go" - package vfs import ( diff --git a/vfs/vfscache/downloaders/downloaders.go b/vfs/vfscache/downloaders/downloaders.go index 46018c7e1..8d6e90fb2 100644 --- a/vfs/vfscache/downloaders/downloaders.go +++ b/vfs/vfscache/downloaders/downloaders.go @@ -1,3 +1,4 @@ +// Package downloaders provides utilities for the VFS layer package downloaders import ( diff --git a/vfs/vfscommon/cachemode.go b/vfs/vfscommon/cachemode.go index a2d91bd4e..c82f3bc98 100644 --- a/vfs/vfscommon/cachemode.go +++ b/vfs/vfscommon/cachemode.go @@ -1,3 +1,4 @@ +// Package vfscommon provides utilities for VFS. package vfscommon import ( diff --git a/vfs/vfstest/vfs.go b/vfs/vfstest/vfs.go index 382fb8844..ad56fd42e 100644 --- a/vfs/vfstest/vfs.go +++ b/vfs/vfstest/vfs.go @@ -1,3 +1,4 @@ +// Package vfstest provides tests for VFS. package vfstest import (