mirror of
https://github.com/asdine/storm.git
synced 2025-09-26 19:01:14 +08:00
use semantic import versioning as required by go
This commit is contained in:
14
README.md
14
README.md
@@ -55,7 +55,7 @@ go get -u github.com/asdine/storm
|
||||
## Import Storm
|
||||
|
||||
```go
|
||||
import "github.com/asdine/storm"
|
||||
import "github.com/asdine/storm/v3"
|
||||
```
|
||||
|
||||
## Open a database
|
||||
@@ -470,12 +470,12 @@ These can be used by importing the relevant package and use that codec to config
|
||||
|
||||
```go
|
||||
import (
|
||||
"github.com/asdine/storm"
|
||||
"github.com/asdine/storm/codec/gob"
|
||||
"github.com/asdine/storm/codec/json"
|
||||
"github.com/asdine/storm/codec/sereal"
|
||||
"github.com/asdine/storm/codec/protobuf"
|
||||
"github.com/asdine/storm/codec/msgpack"
|
||||
"github.com/asdine/storm/v3"
|
||||
"github.com/asdine/storm/v3/codec/gob"
|
||||
"github.com/asdine/storm/v3/codec/json"
|
||||
"github.com/asdine/storm/v3/codec/sereal"
|
||||
"github.com/asdine/storm/v3/codec/protobuf"
|
||||
"github.com/asdine/storm/v3/codec/msgpack"
|
||||
)
|
||||
|
||||
var gobDb, _ = storm.Open("gob.db", storm.Codec(gob.Codec))
|
||||
|
@@ -3,12 +3,12 @@ package codec_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/asdine/storm"
|
||||
"github.com/asdine/storm/codec/gob"
|
||||
"github.com/asdine/storm/codec/json"
|
||||
"github.com/asdine/storm/codec/msgpack"
|
||||
"github.com/asdine/storm/codec/protobuf"
|
||||
"github.com/asdine/storm/codec/sereal"
|
||||
"github.com/asdine/storm/v3"
|
||||
"github.com/asdine/storm/v3/codec/gob"
|
||||
"github.com/asdine/storm/v3/codec/json"
|
||||
"github.com/asdine/storm/v3/codec/msgpack"
|
||||
"github.com/asdine/storm/v3/codec/protobuf"
|
||||
"github.com/asdine/storm/v3/codec/sereal"
|
||||
)
|
||||
|
||||
func Example() {
|
||||
|
@@ -3,7 +3,7 @@ package gob
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/asdine/storm/codec/internal"
|
||||
"github.com/asdine/storm/v3/codec/internal"
|
||||
)
|
||||
|
||||
func TestGob(t *testing.T) {
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/asdine/storm/codec"
|
||||
"github.com/asdine/storm/v3/codec"
|
||||
)
|
||||
|
||||
type testStruct struct {
|
||||
|
@@ -3,7 +3,7 @@ package json
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/asdine/storm/codec/internal"
|
||||
"github.com/asdine/storm/v3/codec/internal"
|
||||
)
|
||||
|
||||
func TestJSON(t *testing.T) {
|
||||
|
@@ -3,7 +3,7 @@ package msgpack
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/asdine/storm/codec/internal"
|
||||
"github.com/asdine/storm/v3/codec/internal"
|
||||
)
|
||||
|
||||
func TestMsgpack(t *testing.T) {
|
||||
|
@@ -4,7 +4,7 @@ package protobuf
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/asdine/storm/codec/json"
|
||||
"github.com/asdine/storm/v3/codec/json"
|
||||
"github.com/golang/protobuf/proto"
|
||||
)
|
||||
|
||||
|
@@ -6,8 +6,8 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/asdine/storm"
|
||||
"github.com/asdine/storm/codec/internal"
|
||||
"github.com/asdine/storm/v3"
|
||||
"github.com/asdine/storm/v3/codec/internal"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
@@ -3,7 +3,7 @@ package sereal
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/asdine/storm/codec/internal"
|
||||
"github.com/asdine/storm/v3/codec/internal"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
@@ -9,8 +9,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/asdine/storm"
|
||||
"github.com/asdine/storm/codec/gob"
|
||||
"github.com/asdine/storm/v3"
|
||||
"github.com/asdine/storm/v3/codec/gob"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/asdine/storm/index"
|
||||
"github.com/asdine/storm/v3/index"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
|
@@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/asdine/storm/index"
|
||||
"github.com/asdine/storm/q"
|
||||
"github.com/asdine/storm/v3/index"
|
||||
"github.com/asdine/storm/v3/q"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
|
4
go.mod
4
go.mod
@@ -1,4 +1,4 @@
|
||||
module github.com/asdine/storm
|
||||
module github.com/asdine/storm/v3
|
||||
|
||||
require (
|
||||
github.com/Sereal/Sereal v0.0.0-20190618215532-0b8ac451a863
|
||||
@@ -10,3 +10,5 @@ require (
|
||||
github.com/vmihailenco/msgpack v4.0.1+incompatible
|
||||
go.etcd.io/bbolt v1.3.0
|
||||
)
|
||||
|
||||
go 1.13
|
||||
|
@@ -3,7 +3,7 @@ package index
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"github.com/asdine/storm/internal"
|
||||
"github.com/asdine/storm/v3/internal"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
|
@@ -8,9 +8,9 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/asdine/storm"
|
||||
"github.com/asdine/storm/codec/gob"
|
||||
"github.com/asdine/storm/index"
|
||||
"github.com/asdine/storm/v3"
|
||||
"github.com/asdine/storm/v3/codec/gob"
|
||||
"github.com/asdine/storm/v3/index"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@@ -3,7 +3,7 @@ package index
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"github.com/asdine/storm/internal"
|
||||
"github.com/asdine/storm/v3/internal"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
|
@@ -7,9 +7,9 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/asdine/storm"
|
||||
"github.com/asdine/storm/codec/gob"
|
||||
"github.com/asdine/storm/index"
|
||||
"github.com/asdine/storm/v3"
|
||||
"github.com/asdine/storm/v3/codec/gob"
|
||||
"github.com/asdine/storm/v3/index"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@@ -5,8 +5,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/asdine/storm/codec/gob"
|
||||
"github.com/asdine/storm/codec/json"
|
||||
"github.com/asdine/storm/v3/codec/gob"
|
||||
"github.com/asdine/storm/v3/codec/json"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
2
node.go
2
node.go
@@ -1,7 +1,7 @@
|
||||
package storm
|
||||
|
||||
import (
|
||||
"github.com/asdine/storm/codec"
|
||||
"github.com/asdine/storm/v3/codec"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
|
@@ -3,8 +3,8 @@ package storm
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/asdine/storm/codec/gob"
|
||||
"github.com/asdine/storm/codec/json"
|
||||
"github.com/asdine/storm/v3/codec/gob"
|
||||
"github.com/asdine/storm/v3/codec/json"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@@ -3,8 +3,8 @@ package storm
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/asdine/storm/codec"
|
||||
"github.com/asdine/storm/index"
|
||||
"github.com/asdine/storm/v3/codec"
|
||||
"github.com/asdine/storm/v3/index"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
|
@@ -12,8 +12,8 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/asdine/storm"
|
||||
"github.com/asdine/storm/q"
|
||||
"github.com/asdine/storm/v3"
|
||||
"github.com/asdine/storm/v3/q"
|
||||
)
|
||||
|
||||
func ExampleRe() {
|
||||
|
4
query.go
4
query.go
@@ -1,8 +1,8 @@
|
||||
package storm
|
||||
|
||||
import (
|
||||
"github.com/asdine/storm/internal"
|
||||
"github.com/asdine/storm/q"
|
||||
"github.com/asdine/storm/v3/internal"
|
||||
"github.com/asdine/storm/v3/q"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
|
@@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/asdine/storm/codec/json"
|
||||
"github.com/asdine/storm/q"
|
||||
"github.com/asdine/storm/v3/codec/json"
|
||||
"github.com/asdine/storm/v3/q"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
4
sink.go
4
sink.go
@@ -4,8 +4,8 @@ import (
|
||||
"reflect"
|
||||
"sort"
|
||||
"time"
|
||||
"github.com/asdine/storm/index"
|
||||
"github.com/asdine/storm/q"
|
||||
"github.com/asdine/storm/v3/index"
|
||||
"github.com/asdine/storm/v3/q"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
|
4
store.go
4
store.go
@@ -4,8 +4,8 @@ import (
|
||||
"bytes"
|
||||
"reflect"
|
||||
|
||||
"github.com/asdine/storm/index"
|
||||
"github.com/asdine/storm/q"
|
||||
"github.com/asdine/storm/v3/index"
|
||||
"github.com/asdine/storm/v3/q"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
|
@@ -6,9 +6,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/asdine/storm/codec/gob"
|
||||
"github.com/asdine/storm/codec/json"
|
||||
"github.com/asdine/storm/q"
|
||||
"github.com/asdine/storm/v3/codec/gob"
|
||||
"github.com/asdine/storm/v3/codec/json"
|
||||
"github.com/asdine/storm/v3/q"
|
||||
"github.com/stretchr/testify/require"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
4
storm.go
4
storm.go
@@ -5,8 +5,8 @@ import (
|
||||
"encoding/binary"
|
||||
"time"
|
||||
|
||||
"github.com/asdine/storm/codec"
|
||||
"github.com/asdine/storm/codec/json"
|
||||
"github.com/asdine/storm/v3/codec"
|
||||
"github.com/asdine/storm/v3/codec/json"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
|
@@ -11,7 +11,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/asdine/storm/codec/json"
|
||||
"github.com/asdine/storm/v3/codec/json"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
Reference in New Issue
Block a user