aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorluchenhan <168071714+luchenhan@users.noreply.github.com>2024-05-16 15:02:57 +0800
committerGitHub <noreply@github.com>2024-05-16 07:02:57 +0000
commit57d399317e050189d76068872cf791f1cd1c0e24 (patch)
tree575107a9941911c4cfff3beca06a3b9a1c3c9253 /lib
parentf2d6722348d8ba51b4e7b11ad1176f73cb75a3b1 (diff)
downloadsyncthing-57d399317e050189d76068872cf791f1cd1c0e24.tar.gz
syncthing-57d399317e050189d76068872cf791f1cd1c0e24.zip
lib/db: Correct function name in comments (#9520)
Diffstat (limited to 'lib')
-rw-r--r--lib/db/backend/leveldb_open.go2
-rw-r--r--lib/db/namespaced.go2
-rw-r--r--lib/db/structs.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/db/backend/leveldb_open.go b/lib/db/backend/leveldb_open.go
index 32a5585df..3908d7569 100644
--- a/lib/db/backend/leveldb_open.go
+++ b/lib/db/backend/leveldb_open.go
@@ -64,7 +64,7 @@ func OpenLevelDBRO(location string) (Backend, error) {
return newLeveldbBackend(ldb, location), nil
}
-// OpenMemory returns a new Backend referencing an in-memory database.
+// OpenLevelDBMemory returns a new Backend referencing an in-memory database.
func OpenLevelDBMemory() Backend {
ldb, _ := leveldb.Open(storage.NewMemStorage(), nil)
return newLeveldbBackend(ldb, "")
diff --git a/lib/db/namespaced.go b/lib/db/namespaced.go
index b7d00bffc..ec7f3298c 100644
--- a/lib/db/namespaced.go
+++ b/lib/db/namespaced.go
@@ -143,7 +143,7 @@ func NewFolderStatisticsNamespace(db backend.Backend, folder string) *Namespaced
return NewNamespacedKV(db, string(KeyTypeFolderStatistic)+folder)
}
-// NewMiscDateNamespace creates a KV namespace for miscellaneous metadata.
+// NewMiscDataNamespace creates a KV namespace for miscellaneous metadata.
func NewMiscDataNamespace(db backend.Backend) *NamespacedKV {
return NewNamespacedKV(db, string(KeyTypeMiscData))
}
diff --git a/lib/db/structs.go b/lib/db/structs.go
index 8c3c1f39a..a79224a39 100644
--- a/lib/db/structs.go
+++ b/lib/db/structs.go
@@ -388,7 +388,7 @@ func (vl *VersionList) findGlobal() int {
return 0
}
-// findDevices returns whether the device is in InvalidVersions or Versions and
+// findDevice returns whether the device is in InvalidVersions or Versions and
// in InvalidDevices or Devices (true for invalid), the positions in the version
// and device slices and whether it has been found at all.
func (vl *VersionList) findDevice(device []byte) (bool, int, int, bool) {