diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-01-14 23:11:27 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-01-14 23:11:27 -0800 |
| commit | 16ad74f4779bd059017366843ada396d513d4fcc (patch) | |
| tree | 54ff935a752131e48f862798555e9f900a3defbe /weed/filer/mongodb/mongodb_store.go | |
| parent | f002e668def4abdfda5fe8a76599ae6d0fb76319 (diff) | |
| download | seaweedfs-16ad74f4779bd059017366843ada396d513d4fcc.tar.xz seaweedfs-16ad74f4779bd059017366843ada396d513d4fcc.zip | |
go fmt
Diffstat (limited to 'weed/filer/mongodb/mongodb_store.go')
| -rw-r--r-- | weed/filer/mongodb/mongodb_store.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/filer/mongodb/mongodb_store.go b/weed/filer/mongodb/mongodb_store.go index 2549b6029..2e9556f1f 100644 --- a/weed/filer/mongodb/mongodb_store.go +++ b/weed/filer/mongodb/mongodb_store.go @@ -190,7 +190,7 @@ func (store *MongodbStore) ListDirectoryEntries(ctx context.Context, dirPath uti "$gte": startFileName, } } - optLimit := int64(limit+1) + optLimit := int64(limit + 1) opts := &options.FindOptions{Limit: &optLimit, Sort: bson.M{"name": 1}} cur, err := store.connect.Database(store.database).Collection(store.collectionName).Find(ctx, where, opts) for cur.Next(ctx) { @@ -212,7 +212,7 @@ func (store *MongodbStore) ListDirectoryEntries(ctx context.Context, dirPath uti entries = append(entries, entry) } - hasMore = int64(len(entries)) == limit + 1 + hasMore = int64(len(entries)) == limit+1 if hasMore { entries = entries[:limit] } |
