Skip to content

Commit 9b60641

Browse files
committed
Run gofmt
Signed-off-by: Manuel Rüger <[email protected]>
1 parent 00cd697 commit 9b60641

File tree

6 files changed

+15
-18
lines changed

6 files changed

+15
-18
lines changed

Diff for: .github/workflows/tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
- uses: actions/checkout@v2
88
- uses: actions/setup-go@v2
99
with:
10-
go-version: "1.17.8"
10+
go-version: "1.17.13"
1111
- run: make fmt
1212
- run: make race
1313
- run: make test

Diff for: bolt_loong64.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build loong64
12
// +build loong64
23

34
package bbolt

Diff for: db_test.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ const pageHeaderSize = 16
3030

3131
// meta represents a simplified version of a database meta page for testing.
3232
type meta struct {
33-
_ uint32
34-
version uint32
35-
_ uint32
36-
_ uint32
37-
_ [16]byte
38-
_ uint64
39-
pgid uint64
40-
_ uint64
41-
_ uint64
33+
_ uint32
34+
version uint32
35+
_ uint32
36+
_ uint32
37+
_ [16]byte
38+
_ uint64
39+
pgid uint64
40+
_ uint64
41+
_ uint64
4242
}
4343

4444
// Ensure that a database can be opened without error.

Diff for: doc.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ The design of Bolt is based on Howard Chu's LMDB database project.
1414
1515
Bolt currently works on Windows, Mac OS X, and Linux.
1616
17-
18-
Basics
17+
# Basics
1918
2019
There are only a few types in Bolt: DB, Bucket, Tx, and Cursor. The DB is
2120
a collection of buckets and is represented by a single file on disk. A bucket is
@@ -27,8 +26,7 @@ iterate over the dataset sequentially. Read-write transactions can create and
2726
delete buckets and can insert and remove keys. Only one read-write transaction
2827
is allowed at a time.
2928
30-
31-
Caveats
29+
# Caveats
3230
3331
The database uses a read-only, memory-mapped data file to ensure that
3432
applications cannot corrupt the database, however, this means that keys and
@@ -38,7 +36,5 @@ will cause Go to panic.
3836
Keys and values retrieved from the database are only valid for the life of
3937
the transaction. When used outside the transaction, these byte slices can
4038
point to different data or can point to invalid memory which will cause a panic.
41-
42-
4339
*/
4440
package bbolt

Diff for: mlock_unix.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func mlock(db *DB, fileSize int) error {
1818
return nil
1919
}
2020

21-
//munlock unlocks memory of db file
21+
// munlock unlocks memory of db file
2222
func munlock(db *DB, fileSize int) error {
2323
if db.dataref == nil {
2424
return nil

Diff for: mlock_windows.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ func mlock(_ *DB, _ int) error {
55
panic("mlock is supported only on UNIX systems")
66
}
77

8-
//munlock unlocks memory of db file
8+
// munlock unlocks memory of db file
99
func munlock(_ *DB, _ int) error {
1010
panic("munlock is supported only on UNIX systems")
1111
}

0 commit comments

Comments
 (0)