diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a142f30..cb03796 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -7,7 +7,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: "1.17.8" + go-version: "1.17.13" - run: make fmt - run: make race - run: make test diff --git a/bolt_loong64.go b/bolt_loong64.go index c5bb7cb..31c17c1 100644 --- a/bolt_loong64.go +++ b/bolt_loong64.go @@ -1,3 +1,4 @@ +//go:build loong64 // +build loong64 package bbolt diff --git a/db_test.go b/db_test.go index a512a01..c7c63cf 100644 --- a/db_test.go +++ b/db_test.go @@ -30,15 +30,15 @@ const pageHeaderSize = 16 // meta represents a simplified version of a database meta page for testing. type meta struct { - _ uint32 - version uint32 - _ uint32 - _ uint32 - _ [16]byte - _ uint64 - pgid uint64 - _ uint64 - _ uint64 + _ uint32 + version uint32 + _ uint32 + _ uint32 + _ [16]byte + _ uint64 + pgid uint64 + _ uint64 + _ uint64 } // Ensure that a database can be opened without error. diff --git a/doc.go b/doc.go index 95f25f0..d1007e4 100644 --- a/doc.go +++ b/doc.go @@ -14,8 +14,7 @@ The design of Bolt is based on Howard Chu's LMDB database project. Bolt currently works on Windows, Mac OS X, and Linux. - -Basics +# Basics There are only a few types in Bolt: DB, Bucket, Tx, and Cursor. The DB is 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 delete buckets and can insert and remove keys. Only one read-write transaction is allowed at a time. - -Caveats +# Caveats The database uses a read-only, memory-mapped data file to ensure that applications cannot corrupt the database, however, this means that keys and @@ -38,7 +36,5 @@ will cause Go to panic. Keys and values retrieved from the database are only valid for the life of the transaction. When used outside the transaction, these byte slices can point to different data or can point to invalid memory which will cause a panic. - - */ package bbolt diff --git a/mlock_unix.go b/mlock_unix.go index 7e578d4..744a972 100644 --- a/mlock_unix.go +++ b/mlock_unix.go @@ -18,7 +18,7 @@ func mlock(db *DB, fileSize int) error { return nil } -//munlock unlocks memory of db file +// munlock unlocks memory of db file func munlock(db *DB, fileSize int) error { if db.dataref == nil { return nil diff --git a/mlock_windows.go b/mlock_windows.go index b4a36a4..00b0fb4 100644 --- a/mlock_windows.go +++ b/mlock_windows.go @@ -5,7 +5,7 @@ func mlock(_ *DB, _ int) error { panic("mlock is supported only on UNIX systems") } -//munlock unlocks memory of db file +// munlock unlocks memory of db file func munlock(_ *DB, _ int) error { panic("munlock is supported only on UNIX systems") }