diff --git a/Makefile b/Makefile index 4b5a960..5326953 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ unused: # go get github.com/kisielk/errcheck errcheck: - @errcheck -ignorepkg=bytes -ignore=os:Remove github.com/etcd-io/bbolt + @errcheck -ignorepkg=bytes -ignore=os:Remove go.etcd.io/bbolt test: go test -timeout 20m -v -coverprofile cover.out -covermode atomic diff --git a/README.md b/README.md index 243180d..251a09f 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Shopify and Heroku use Bolt-backed services every day. To start using Bolt, install Go and run `go get`: ```sh -$ go get github.com/etcd-io/bbolt/... +$ go get go.etcd.io/bbolt/... ``` This will retrieve the library and install the `bolt` command line utility into @@ -94,7 +94,7 @@ package main import ( "log" - bolt "github.com/etcd-io/bbolt" + bolt "go.etcd.io/bbolt" ) func main() { @@ -537,7 +537,7 @@ this from a read-only transaction, it will perform a hot backup and not block your other database reads and writes. By default, it will use a regular file handle which will utilize the operating -system's page cache. See the [`Tx`](https://godoc.org/github.com/etcd-io/bbolt#Tx) +system's page cache. See the [`Tx`](https://godoc.org/go.etcd.io/bbolt#Tx) documentation for information about optimizing for larger-than-RAM datasets. One common use case is to backup over HTTP so you can use tools like `cURL` to diff --git a/allocate_test.go b/allocate_test.go index 8566b4d..2ff2ac0 100644 --- a/allocate_test.go +++ b/allocate_test.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "testing" diff --git a/bolt_386.go b/bolt_386.go index 820d533..4d35ee7 100644 --- a/bolt_386.go +++ b/bolt_386.go @@ -1,4 +1,4 @@ -package bolt +package bbolt // maxMapSize represents the largest mmap size supported by Bolt. const maxMapSize = 0x7FFFFFFF // 2GB diff --git a/bolt_amd64.go b/bolt_amd64.go index 98fafdb..60a52da 100644 --- a/bolt_amd64.go +++ b/bolt_amd64.go @@ -1,4 +1,4 @@ -package bolt +package bbolt // maxMapSize represents the largest mmap size supported by Bolt. const maxMapSize = 0xFFFFFFFFFFFF // 256TB diff --git a/bolt_arm.go b/bolt_arm.go index 7e5cb4b..105d27d 100644 --- a/bolt_arm.go +++ b/bolt_arm.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import "unsafe" diff --git a/bolt_arm64.go b/bolt_arm64.go index b26d84f..f5aa2a5 100644 --- a/bolt_arm64.go +++ b/bolt_arm64.go @@ -1,6 +1,6 @@ // +build arm64 -package bolt +package bbolt // maxMapSize represents the largest mmap size supported by Bolt. const maxMapSize = 0xFFFFFFFFFFFF // 256TB diff --git a/bolt_linux.go b/bolt_linux.go index 2b67666..7707bca 100644 --- a/bolt_linux.go +++ b/bolt_linux.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "syscall" diff --git a/bolt_mips64x.go b/bolt_mips64x.go index 134b578..baeb289 100644 --- a/bolt_mips64x.go +++ b/bolt_mips64x.go @@ -1,6 +1,6 @@ // +build mips64 mips64le -package bolt +package bbolt // maxMapSize represents the largest mmap size supported by Bolt. const maxMapSize = 0x8000000000 // 512GB diff --git a/bolt_mipsx.go b/bolt_mipsx.go index d5ecb05..2d9b1a9 100644 --- a/bolt_mipsx.go +++ b/bolt_mipsx.go @@ -1,6 +1,6 @@ // +build mips mipsle -package bolt +package bbolt // maxMapSize represents the largest mmap size supported by Bolt. const maxMapSize = 0x40000000 // 1GB diff --git a/bolt_openbsd.go b/bolt_openbsd.go index 7058c3d..d7f5035 100644 --- a/bolt_openbsd.go +++ b/bolt_openbsd.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "syscall" diff --git a/bolt_ppc.go b/bolt_ppc.go index 55cb8a7..6980471 100644 --- a/bolt_ppc.go +++ b/bolt_ppc.go @@ -1,6 +1,6 @@ // +build ppc -package bolt +package bbolt // maxMapSize represents the largest mmap size supported by Bolt. const maxMapSize = 0x7FFFFFFF // 2GB diff --git a/bolt_ppc64.go b/bolt_ppc64.go index 9331d97..3565908 100644 --- a/bolt_ppc64.go +++ b/bolt_ppc64.go @@ -1,6 +1,6 @@ // +build ppc64 -package bolt +package bbolt // maxMapSize represents the largest mmap size supported by Bolt. const maxMapSize = 0xFFFFFFFFFFFF // 256TB diff --git a/bolt_ppc64le.go b/bolt_ppc64le.go index 8c143bc..422c7c6 100644 --- a/bolt_ppc64le.go +++ b/bolt_ppc64le.go @@ -1,6 +1,6 @@ // +build ppc64le -package bolt +package bbolt // maxMapSize represents the largest mmap size supported by Bolt. const maxMapSize = 0xFFFFFFFFFFFF // 256TB diff --git a/bolt_s390x.go b/bolt_s390x.go index d7c39af..6d3fcb8 100644 --- a/bolt_s390x.go +++ b/bolt_s390x.go @@ -1,6 +1,6 @@ // +build s390x -package bolt +package bbolt // maxMapSize represents the largest mmap size supported by Bolt. const maxMapSize = 0xFFFFFFFFFFFF // 256TB diff --git a/bolt_unix.go b/bolt_unix.go index add3bd8..38e11d4 100644 --- a/bolt_unix.go +++ b/bolt_unix.go @@ -1,6 +1,6 @@ // +build !windows,!plan9,!solaris -package bolt +package bbolt import ( "fmt" diff --git a/bolt_unix_solaris.go b/bolt_unix_solaris.go index fd8335e..492eaf3 100644 --- a/bolt_unix_solaris.go +++ b/bolt_unix_solaris.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "fmt" diff --git a/bolt_windows.go b/bolt_windows.go index ca6f9a1..4e3f90f 100644 --- a/bolt_windows.go +++ b/bolt_windows.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "fmt" diff --git a/boltsync_unix.go b/boltsync_unix.go index f504425..9587afe 100644 --- a/boltsync_unix.go +++ b/boltsync_unix.go @@ -1,6 +1,6 @@ // +build !windows,!plan9,!linux,!openbsd -package bolt +package bbolt // fdatasync flushes written data to a file descriptor. func fdatasync(db *DB) error { diff --git a/bucket.go b/bucket.go index 44db88b..84bfd4d 100644 --- a/bucket.go +++ b/bucket.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "bytes" diff --git a/bucket_test.go b/bucket_test.go index 646db95..e48204b 100644 --- a/bucket_test.go +++ b/bucket_test.go @@ -1,4 +1,4 @@ -package bolt_test +package bbolt_test import ( "bytes" @@ -13,7 +13,7 @@ import ( "testing" "testing/quick" - "github.com/etcd-io/bbolt" + bolt "go.etcd.io/bbolt" ) // Ensure that a bucket that gets a non-existent key returns nil. diff --git a/cmd/bolt/main.go b/cmd/bbolt/main.go similarity index 99% rename from cmd/bolt/main.go rename to cmd/bbolt/main.go index 2a4ee4d..1a54804 100644 --- a/cmd/bolt/main.go +++ b/cmd/bbolt/main.go @@ -19,7 +19,7 @@ import ( "unicode/utf8" "unsafe" - bolt "github.com/etcd-io/bbolt" + bolt "go.etcd.io/bbolt" ) var ( diff --git a/cmd/bolt/main_test.go b/cmd/bbolt/main_test.go similarity index 99% rename from cmd/bolt/main_test.go rename to cmd/bbolt/main_test.go index 24fe184..b4871ff 100644 --- a/cmd/bolt/main_test.go +++ b/cmd/bbolt/main_test.go @@ -12,8 +12,7 @@ import ( "strconv" "testing" - "github.com/etcd-io/bbolt" - "github.com/etcd-io/bbolt/cmd/bolt" + bolt "go.etcd.io/bbolt" ) // Ensure the "info" command can print information about a database. diff --git a/cursor.go b/cursor.go index 1bdda63..3000ace 100644 --- a/cursor.go +++ b/cursor.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "bytes" diff --git a/cursor_test.go b/cursor_test.go index 0480c74..d2a8bc7 100644 --- a/cursor_test.go +++ b/cursor_test.go @@ -1,4 +1,4 @@ -package bolt_test +package bbolt_test import ( "bytes" @@ -11,7 +11,7 @@ import ( "testing" "testing/quick" - "github.com/etcd-io/bbolt" + bolt "go.etcd.io/bbolt" ) // Ensure that a cursor can return a reference to the bucket that created it. diff --git a/db.go b/db.go index b37074e..4e38ab8 100644 --- a/db.go +++ b/db.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "errors" diff --git a/db_test.go b/db_test.go index 73682fc..aa0be75 100644 --- a/db_test.go +++ b/db_test.go @@ -1,4 +1,4 @@ -package bolt_test +package bbolt_test import ( "bytes" @@ -18,7 +18,7 @@ import ( "time" "unsafe" - "github.com/etcd-io/bbolt" + bolt "go.etcd.io/bbolt" ) var statsFlag = flag.Bool("stats", false, "show performance stats") diff --git a/doc.go b/doc.go index cc93784..95f25f0 100644 --- a/doc.go +++ b/doc.go @@ -1,5 +1,5 @@ /* -Package bolt implements a low-level key/value store in pure Go. It supports +package bbolt implements a low-level key/value store in pure Go. It supports fully serializable transactions, ACID semantics, and lock-free MVCC with multiple readers and a single writer. Bolt can be used for projects that want a simple data store without the need to add large dependencies such as @@ -41,4 +41,4 @@ point to different data or can point to invalid memory which will cause a panic. */ -package bolt +package bbolt diff --git a/errors.go b/errors.go index a3620a3..48758ca 100644 --- a/errors.go +++ b/errors.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import "errors" diff --git a/freelist.go b/freelist.go index 266f154..e4bcb2d 100644 --- a/freelist.go +++ b/freelist.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "fmt" diff --git a/freelist_test.go b/freelist_test.go index 24ed4cf..184021f 100644 --- a/freelist_test.go +++ b/freelist_test.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "math/rand" diff --git a/node.go b/node.go index f4ce240..6c3fa55 100644 --- a/node.go +++ b/node.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "bytes" diff --git a/node_test.go b/node_test.go index fa5d10f..a7b0d97 100644 --- a/node_test.go +++ b/node_test.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "testing" diff --git a/page.go b/page.go index cde403a..bca9615 100644 --- a/page.go +++ b/page.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "fmt" diff --git a/page_test.go b/page_test.go index 59f4a30..9f5b7c0 100644 --- a/page_test.go +++ b/page_test.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "reflect" diff --git a/quick_test.go b/quick_test.go index 9e27792..b770572 100644 --- a/quick_test.go +++ b/quick_test.go @@ -1,4 +1,4 @@ -package bolt_test +package bbolt_test import ( "bytes" diff --git a/simulation_no_freelist_sync_test.go b/simulation_no_freelist_sync_test.go index 3324535..25c3dfb 100644 --- a/simulation_no_freelist_sync_test.go +++ b/simulation_no_freelist_sync_test.go @@ -1,9 +1,9 @@ -package bolt_test +package bbolt_test import ( "testing" - "github.com/etcd-io/bbolt" + bolt "go.etcd.io/bbolt" ) func TestSimulateNoFreeListSync_1op_1p(t *testing.T) { diff --git a/simulation_test.go b/simulation_test.go index 8ae2e3a..70f2396 100644 --- a/simulation_test.go +++ b/simulation_test.go @@ -1,4 +1,4 @@ -package bolt_test +package bbolt_test import ( "bytes" @@ -7,7 +7,7 @@ import ( "sync" "testing" - "github.com/etcd-io/bbolt" + bolt "go.etcd.io/bbolt" ) func TestSimulate_1op_1p(t *testing.T) { testSimulate(t, nil, 1, 1, 1) } diff --git a/tx.go b/tx.go index 41a9bc6..f508641 100644 --- a/tx.go +++ b/tx.go @@ -1,4 +1,4 @@ -package bolt +package bbolt import ( "fmt" diff --git a/tx_test.go b/tx_test.go index c9db24f..4760c7a 100644 --- a/tx_test.go +++ b/tx_test.go @@ -1,4 +1,4 @@ -package bolt_test +package bbolt_test import ( "bytes" @@ -8,7 +8,7 @@ import ( "os" "testing" - "github.com/etcd-io/bbolt" + bolt "go.etcd.io/bbolt" ) // TestTx_Check_ReadOnly tests consistency checking on a ReadOnly database.