forked from mirror/ledisdb
move some pkgs to vendor
godep can not handle some pkgs which have build tags So we put these into vendor explicitly
This commit is contained in:
parent
dddbd5f146
commit
b36d4aba37
|
@ -74,10 +74,6 @@
|
|||
"ImportPath": "github.com/syndtr/gosnappy/snappy",
|
||||
"Rev": "ce8acff4829e0c2458a67ead32390ac0a381c862"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/szferi/gomdb",
|
||||
"Rev": "6bcb5a8059f9655a259774650dbe0cad422767a3"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/ugorji/go/codec",
|
||||
"Rev": "71c2886f5a673a35f909803f38ece5810165097b"
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
[568vq].out
|
||||
|
||||
*.cgo1.go
|
||||
*.cgo2.c
|
||||
_cgo_defun.c
|
||||
_cgo_gotypes.go
|
||||
_cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
4
Makefile
4
Makefile
|
@ -16,13 +16,13 @@ all: build
|
|||
build:
|
||||
$(GO) install -tags 'linenoise $(GO_BUILD_TAGS)' ./...
|
||||
|
||||
build_use_lmdb:
|
||||
build_lmdb:
|
||||
$(GO) install -tags 'linenoise $(GO_BUILD_TAGS) lmdb' ./...
|
||||
|
||||
test:
|
||||
$(GO) test --race -tags '$(GO_BUILD_TAGS)' ./...
|
||||
|
||||
test_use_lmdb:
|
||||
test_lmdb:
|
||||
$(GO) test --race -tags '$(GO_BUILD_TAGS) lmdb' ./...
|
||||
|
||||
test_ledis:
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"fmt"
|
||||
"github.com/siddontang/go/hack"
|
||||
|
||||
"github.com/siddontang/ledisdb/lua"
|
||||
"github.com/siddontang/ledisdb/vendor/lua"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/siddontang/go/hack"
|
||||
"github.com/siddontang/go/num"
|
||||
"github.com/siddontang/ledisdb/ledis"
|
||||
"github.com/siddontang/ledisdb/lua"
|
||||
"github.com/siddontang/ledisdb/vendor/lua"
|
||||
"io"
|
||||
"sync"
|
||||
)
|
||||
|
|
|
@ -5,7 +5,7 @@ package server
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/siddontang/ledisdb/config"
|
||||
"github.com/siddontang/ledisdb/lua"
|
||||
"github.com/siddontang/ledisdb/vendor/lua"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
|
|
@ -5,7 +5,7 @@ package mdb
|
|||
import (
|
||||
"github.com/siddontang/ledisdb/config"
|
||||
"github.com/siddontang/ledisdb/store/driver"
|
||||
mdb "github.com/szferi/gomdb"
|
||||
mdb "github.com/siddontang/ledisdb/vendor/gomdb"
|
||||
"os"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ package mdb
|
|||
|
||||
import (
|
||||
"github.com/siddontang/ledisdb/store/driver"
|
||||
mdb "github.com/szferi/gomdb"
|
||||
mdb "github.com/siddontang/ledisdb/vendor/gomdb"
|
||||
)
|
||||
|
||||
type Snapshot struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ package mdb
|
|||
|
||||
import (
|
||||
"github.com/siddontang/ledisdb/store/driver"
|
||||
mdb "github.com/szferi/gomdb"
|
||||
mdb "github.com/siddontang/ledisdb/vendor/gomdb"
|
||||
)
|
||||
|
||||
type Tx struct {
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[godep](https://github.com/tools/godep) can not save packages which have build tags.
|
||||
|
||||
So we put these packages here explicitly.
|
|
@ -1,3 +1,5 @@
|
|||
// +build lmdb
|
||||
|
||||
package mdb
|
||||
|
||||
import (
|
|
@ -1,3 +1,5 @@
|
|||
// +build lmdb
|
||||
|
||||
package mdb
|
||||
|
||||
/*
|
|
@ -1,3 +1,5 @@
|
|||
// +build lmdb
|
||||
|
||||
package mdb
|
||||
|
||||
/*
|
|
@ -1,3 +1,5 @@
|
|||
// +build lmdb
|
||||
|
||||
package mdb
|
||||
|
||||
import (
|
|
@ -1,8 +1,10 @@
|
|||
// +build lmdb
|
||||
|
||||
package mdb
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"syscall"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestErrno(t *testing.T) {
|
|
@ -1,3 +1,5 @@
|
|||
// +build lmdb
|
||||
|
||||
package mdb
|
||||
|
||||
import (
|
|
@ -1,3 +1,5 @@
|
|||
// +build lmdb
|
||||
|
||||
/** @file lmdb.h
|
||||
* @brief Lightning memory-mapped database library
|
||||
*
|
|
@ -1,3 +1,5 @@
|
|||
// +build lmdb
|
||||
|
||||
/** @file mdb.c
|
||||
* @brief Lightning memory-mapped database library
|
||||
*
|
|
@ -1,3 +1,5 @@
|
|||
// +build lmdb
|
||||
|
||||
/*
|
||||
A thin wrapper for the lmdb C library. These are low-level bindings for the C
|
||||
API. The C documentation should be used as a reference while developing
|
|
@ -1,3 +1,5 @@
|
|||
// +build lmdb
|
||||
|
||||
package mdb
|
||||
|
||||
import (
|
|
@ -1,3 +1,5 @@
|
|||
// +build lmdb
|
||||
|
||||
/** @file midl.c
|
||||
* @brief ldap bdb back-end ID List functions */
|
||||
/* $OpenLDAP$ */
|
|
@ -1,3 +1,5 @@
|
|||
// +build lmdb
|
||||
|
||||
/** @file midl.h
|
||||
* @brief LMDB ID List header file.
|
||||
*
|
|
@ -1,3 +1,5 @@
|
|||
// +build lmdb
|
||||
|
||||
package mdb
|
||||
|
||||
/*
|
||||
|
@ -66,20 +68,20 @@ func (env *Env) BeginTxn(parent *Txn, flags uint) (*Txn, error) {
|
|||
func (txn *Txn) Commit() error {
|
||||
ret := C.mdb_txn_commit(txn._txn)
|
||||
runtime.UnlockOSThread()
|
||||
// The transaction handle is freed if there was no error
|
||||
if ret == C.MDB_SUCCESS {
|
||||
txn._txn = nil
|
||||
}
|
||||
// The transaction handle is freed if there was no error
|
||||
if ret == C.MDB_SUCCESS {
|
||||
txn._txn = nil
|
||||
}
|
||||
return errno(ret)
|
||||
}
|
||||
|
||||
func (txn *Txn) Abort() {
|
||||
if txn._txn == nil {
|
||||
return
|
||||
}
|
||||
C.mdb_txn_abort(txn._txn)
|
||||
return
|
||||
}
|
||||
C.mdb_txn_abort(txn._txn)
|
||||
runtime.UnlockOSThread()
|
||||
// The transaction handle is always freed.
|
||||
// The transaction handle is always freed.
|
||||
txn._txn = nil
|
||||
}
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
// +build lmdb
|
||||
|
||||
package mdb
|
||||
|
||||
/*
|
|
@ -1,3 +1,5 @@
|
|||
// +build lmdb
|
||||
|
||||
package mdb
|
||||
|
||||
import (
|
|
@ -0,0 +1,22 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 siddontang
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
Loading…
Reference in New Issue