Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build warning and test fixes #129

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/lmdb_copy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"log"
"os"

"github.com/bmatsuo/lmdb-go/internal/lmdbcmd"
"github.com/bmatsuo/lmdb-go/lmdb"
"github.com/yerden/lmdb-go/internal/lmdbcmd"
"github.com/yerden/lmdb-go/lmdb"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions cmd/lmdb_stat/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"strings"
"unsafe"

"github.com/bmatsuo/lmdb-go/internal/lmdbcmd"
"github.com/bmatsuo/lmdb-go/lmdb"
"github.com/bmatsuo/lmdb-go/lmdbscan"
"github.com/yerden/lmdb-go/internal/lmdbcmd"
"github.com/yerden/lmdb-go/lmdb"
"github.com/yerden/lmdb-go/lmdbscan"
)

func main() {
Expand Down
8 changes: 4 additions & 4 deletions exp/cmd/lmdb_cat/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"os"
"strings"

"github.com/bmatsuo/lmdb-go/exp/lmdbsync"
"github.com/bmatsuo/lmdb-go/internal/lmdbcmd"
"github.com/bmatsuo/lmdb-go/lmdb"
"github.com/bmatsuo/lmdb-go/lmdbscan"
"github.com/yerden/lmdb-go/exp/lmdbsync"
"github.com/yerden/lmdb-go/internal/lmdbcmd"
"github.com/yerden/lmdb-go/lmdb"
"github.com/yerden/lmdb-go/lmdbscan"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion exp/lmdbpool/txnpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"sync/atomic"

"github.com/bmatsuo/lmdb-go/lmdb"
"github.com/yerden/lmdb-go/lmdb"
)

// UpdateHandling describes how a TxnPool handles existing lmdb.Readonly
Expand Down
2 changes: 1 addition & 1 deletion exp/lmdbsync/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"golang.org/x/net/context"

"github.com/bmatsuo/lmdb-go/lmdb"
"github.com/yerden/lmdb-go/lmdb"
)

// Handler can intercept errors returned by a transaction and handle them in an
Expand Down
4 changes: 2 additions & 2 deletions exp/lmdbsync/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"golang.org/x/net/context"

"github.com/bmatsuo/lmdb-go/internal/lmdbtest"
"github.com/bmatsuo/lmdb-go/lmdb"
"github.com/yerden/lmdb-go/internal/lmdbtest"
"github.com/yerden/lmdb-go/lmdb"
)

type testHandler struct {
Expand Down
2 changes: 1 addition & 1 deletion exp/lmdbsync/lmdbsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ import (

"golang.org/x/net/context"

"github.com/bmatsuo/lmdb-go/lmdb"
"github.com/yerden/lmdb-go/lmdb"
)

// Env wraps an *lmdb.Env, receiving all the same methods and proxying some to
Expand Down
4 changes: 2 additions & 2 deletions exp/lmdbsync/lmdbsync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"testing"
"time"

"github.com/bmatsuo/lmdb-go/internal/lmdbtest"
"github.com/bmatsuo/lmdb-go/lmdb"
"github.com/yerden/lmdb-go/internal/lmdbtest"
"github.com/yerden/lmdb-go/lmdb"
)

var optNoLock = &lmdbtest.EnvOptions{Flags: lmdb.NoLock}
Expand Down
4 changes: 2 additions & 2 deletions exp/lmdbsync/testresize/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (

"golang.org/x/net/context"

"github.com/bmatsuo/lmdb-go/exp/lmdbsync"
"github.com/bmatsuo/lmdb-go/lmdb"
"github.com/yerden/lmdb-go/exp/lmdbsync"
"github.com/yerden/lmdb-go/lmdb"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion exp/lmdbsync/testresize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"golang.org/x/net/context"

"github.com/bmatsuo/lmdb-go/lmdb"
"github.com/yerden/lmdb-go/lmdb"
)

func TestResize(t *testing.T) {
Expand Down
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/yerden/lmdb-go

go 1.18

require golang.org/x/net v0.0.0-20220708220712-1185a9018129
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
golang.org/x/net v0.0.0-20220708220712-1185a9018129 h1:vucSRfWwTsoXro7P+3Cjlr6flUMtzCwzlvkxEQtHHB0=
golang.org/x/net v0.0.0-20220708220712-1185a9018129/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
2 changes: 1 addition & 1 deletion internal/lmdbcmd/cmutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"io"
"os"

"github.com/bmatsuo/lmdb-go/lmdb"
"github.com/yerden/lmdb-go/lmdb"
)

var flagPrintVersion bool
Expand Down
2 changes: 1 addition & 1 deletion internal/lmdbtest/lmdbtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"io/ioutil"
"os"

"github.com/bmatsuo/lmdb-go/lmdb"
"github.com/yerden/lmdb-go/lmdb"
)

// ItemList is a list of database items.
Expand Down
9 changes: 8 additions & 1 deletion lmdb/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"runtime"
"time"

"github.com/bmatsuo/lmdb-go/lmdb"
"github.com/yerden/lmdb-go/lmdb"
)

// These values shouldn't actually be assigned to. The are used as stand-ins
Expand Down Expand Up @@ -339,6 +339,7 @@ func ExampleEnv() {
defer env.Close()

var dbi lmdb.DBI
_ = dbi
err = env.Update(func(txn *lmdb.Txn) (err error) {
// open a database, creating it if necessary. the database is stored
// outside the transaction via closure and can be use after the
Expand Down Expand Up @@ -666,6 +667,7 @@ func ExampleTxn_OpenDBI() {
// DBI handles can be saved after their opening transaction has committed
// and may be reused as long as the environment remains open.
var dbi lmdb.DBI
_ = dbi
err = env.Update(func(txn *lmdb.Txn) (err error) {
dbi, err = txn.OpenDBI("dbfound", 0)
return err
Expand All @@ -680,6 +682,7 @@ func ExampleTxn_OpenDBI() {
// data written by Txn./Cursor.Put().
func ExampleTxn_OpenDBI_create() {
var dbi lmdb.DBI
_ = dbi
err = env.Update(func(txn *lmdb.Txn) (err error) {
dbi, err = txn.OpenDBI("dbnew", lmdb.Create)
return err
Expand All @@ -694,6 +697,7 @@ func ExampleTxn_OpenDBI_create() {
// IsNotFound() will test an error for this condition.
func ExampleTxn_OpenDBI_notFound() {
var dbi lmdb.DBI
_ = dbi
err = env.Update(func(txn *lmdb.Txn) (err error) {
dbi, err = txn.OpenDBI("dbnotfound", 0)
return err
Expand All @@ -707,6 +711,7 @@ func ExampleTxn_OpenDBI_notFound() {
// case then the function IsError() can test an error for this condition.
func ExampleTxn_OpenDBI_dBsFull() {
var dbi lmdb.DBI
_ = dbi
err = env.Update(func(txn *lmdb.Txn) (err error) {
dbi, err = txn.OpenDBI("dbnotexist", 0)
return err
Expand All @@ -725,6 +730,7 @@ func ExampleTxn_OpenRoot() {
if err != nil {
panic(err)
}
_ = dbi
}

// Txn.OpenRoot may also be called without flags inside View transactions
Expand Down Expand Up @@ -768,6 +774,7 @@ func ExampleTxn_Get() {
var point struct{ X, Y int }
var str string
var p1, p2 []byte
_, _, _ = str, p1, p2

// extract data from an example environment/database. it is critical for application
// code to handle errors but that is omitted here to save space.
Expand Down
Loading