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
|
## Import Storm
|
||||||
|
|
||||||
```go
|
```go
|
||||||
import "github.com/asdine/storm"
|
import "github.com/asdine/storm/v3"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Open a database
|
## Open a database
|
||||||
@@ -470,12 +470,12 @@ These can be used by importing the relevant package and use that codec to config
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
import (
|
import (
|
||||||
"github.com/asdine/storm"
|
"github.com/asdine/storm/v3"
|
||||||
"github.com/asdine/storm/codec/gob"
|
"github.com/asdine/storm/v3/codec/gob"
|
||||||
"github.com/asdine/storm/codec/json"
|
"github.com/asdine/storm/v3/codec/json"
|
||||||
"github.com/asdine/storm/codec/sereal"
|
"github.com/asdine/storm/v3/codec/sereal"
|
||||||
"github.com/asdine/storm/codec/protobuf"
|
"github.com/asdine/storm/v3/codec/protobuf"
|
||||||
"github.com/asdine/storm/codec/msgpack"
|
"github.com/asdine/storm/v3/codec/msgpack"
|
||||||
)
|
)
|
||||||
|
|
||||||
var gobDb, _ = storm.Open("gob.db", storm.Codec(gob.Codec))
|
var gobDb, _ = storm.Open("gob.db", storm.Codec(gob.Codec))
|
||||||
|
@@ -3,12 +3,12 @@ package codec_test
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/asdine/storm"
|
"github.com/asdine/storm/v3"
|
||||||
"github.com/asdine/storm/codec/gob"
|
"github.com/asdine/storm/v3/codec/gob"
|
||||||
"github.com/asdine/storm/codec/json"
|
"github.com/asdine/storm/v3/codec/json"
|
||||||
"github.com/asdine/storm/codec/msgpack"
|
"github.com/asdine/storm/v3/codec/msgpack"
|
||||||
"github.com/asdine/storm/codec/protobuf"
|
"github.com/asdine/storm/v3/codec/protobuf"
|
||||||
"github.com/asdine/storm/codec/sereal"
|
"github.com/asdine/storm/v3/codec/sereal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Example() {
|
func Example() {
|
||||||
|
@@ -3,7 +3,7 @@ package gob
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/asdine/storm/codec/internal"
|
"github.com/asdine/storm/v3/codec/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGob(t *testing.T) {
|
func TestGob(t *testing.T) {
|
||||||
|
@@ -5,7 +5,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/asdine/storm/codec"
|
"github.com/asdine/storm/v3/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type testStruct struct {
|
type testStruct struct {
|
||||||
|
@@ -3,7 +3,7 @@ package json
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/asdine/storm/codec/internal"
|
"github.com/asdine/storm/v3/codec/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestJSON(t *testing.T) {
|
func TestJSON(t *testing.T) {
|
||||||
|
@@ -3,7 +3,7 @@ package msgpack
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/asdine/storm/codec/internal"
|
"github.com/asdine/storm/v3/codec/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMsgpack(t *testing.T) {
|
func TestMsgpack(t *testing.T) {
|
||||||
|
@@ -4,7 +4,7 @@ package protobuf
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/asdine/storm/codec/json"
|
"github.com/asdine/storm/v3/codec/json"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -6,8 +6,8 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/asdine/storm"
|
"github.com/asdine/storm/v3"
|
||||||
"github.com/asdine/storm/codec/internal"
|
"github.com/asdine/storm/v3/codec/internal"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ package sereal
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/asdine/storm/codec/internal"
|
"github.com/asdine/storm/v3/codec/internal"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -9,8 +9,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/asdine/storm"
|
"github.com/asdine/storm/v3"
|
||||||
"github.com/asdine/storm/codec/gob"
|
"github.com/asdine/storm/v3/codec/gob"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/asdine/storm/index"
|
"github.com/asdine/storm/v3/index"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -4,8 +4,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"github.com/asdine/storm/index"
|
"github.com/asdine/storm/v3/index"
|
||||||
"github.com/asdine/storm/q"
|
"github.com/asdine/storm/v3/q"
|
||||||
bolt "go.etcd.io/bbolt"
|
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 (
|
require (
|
||||||
github.com/Sereal/Sereal v0.0.0-20190618215532-0b8ac451a863
|
github.com/Sereal/Sereal v0.0.0-20190618215532-0b8ac451a863
|
||||||
@@ -10,3 +10,5 @@ require (
|
|||||||
github.com/vmihailenco/msgpack v4.0.1+incompatible
|
github.com/vmihailenco/msgpack v4.0.1+incompatible
|
||||||
go.etcd.io/bbolt v1.3.0
|
go.etcd.io/bbolt v1.3.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
go 1.13
|
||||||
|
@@ -3,7 +3,7 @@ package index
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
||||||
"github.com/asdine/storm/internal"
|
"github.com/asdine/storm/v3/internal"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -8,9 +8,9 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/asdine/storm"
|
"github.com/asdine/storm/v3"
|
||||||
"github.com/asdine/storm/codec/gob"
|
"github.com/asdine/storm/v3/codec/gob"
|
||||||
"github.com/asdine/storm/index"
|
"github.com/asdine/storm/v3/index"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
@@ -3,7 +3,7 @@ package index
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
||||||
"github.com/asdine/storm/internal"
|
"github.com/asdine/storm/v3/internal"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -7,9 +7,9 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/asdine/storm"
|
"github.com/asdine/storm/v3"
|
||||||
"github.com/asdine/storm/codec/gob"
|
"github.com/asdine/storm/v3/codec/gob"
|
||||||
"github.com/asdine/storm/index"
|
"github.com/asdine/storm/v3/index"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
@@ -5,8 +5,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/asdine/storm/codec/gob"
|
"github.com/asdine/storm/v3/codec/gob"
|
||||||
"github.com/asdine/storm/codec/json"
|
"github.com/asdine/storm/v3/codec/json"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
2
node.go
2
node.go
@@ -1,7 +1,7 @@
|
|||||||
package storm
|
package storm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/asdine/storm/codec"
|
"github.com/asdine/storm/v3/codec"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -3,8 +3,8 @@ package storm
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/asdine/storm/codec/gob"
|
"github.com/asdine/storm/v3/codec/gob"
|
||||||
"github.com/asdine/storm/codec/json"
|
"github.com/asdine/storm/v3/codec/json"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
@@ -3,8 +3,8 @@ package storm
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/asdine/storm/codec"
|
"github.com/asdine/storm/v3/codec"
|
||||||
"github.com/asdine/storm/index"
|
"github.com/asdine/storm/v3/index"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -12,8 +12,8 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/asdine/storm"
|
"github.com/asdine/storm/v3"
|
||||||
"github.com/asdine/storm/q"
|
"github.com/asdine/storm/v3/q"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ExampleRe() {
|
func ExampleRe() {
|
||||||
|
4
query.go
4
query.go
@@ -1,8 +1,8 @@
|
|||||||
package storm
|
package storm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/asdine/storm/internal"
|
"github.com/asdine/storm/v3/internal"
|
||||||
"github.com/asdine/storm/q"
|
"github.com/asdine/storm/v3/q"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -4,8 +4,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/asdine/storm/codec/json"
|
"github.com/asdine/storm/v3/codec/json"
|
||||||
"github.com/asdine/storm/q"
|
"github.com/asdine/storm/v3/q"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
4
sink.go
4
sink.go
@@ -4,8 +4,8 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"sort"
|
"sort"
|
||||||
"time"
|
"time"
|
||||||
"github.com/asdine/storm/index"
|
"github.com/asdine/storm/v3/index"
|
||||||
"github.com/asdine/storm/q"
|
"github.com/asdine/storm/v3/q"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
4
store.go
4
store.go
@@ -4,8 +4,8 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"github.com/asdine/storm/index"
|
"github.com/asdine/storm/v3/index"
|
||||||
"github.com/asdine/storm/q"
|
"github.com/asdine/storm/v3/q"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -6,9 +6,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/asdine/storm/codec/gob"
|
"github.com/asdine/storm/v3/codec/gob"
|
||||||
"github.com/asdine/storm/codec/json"
|
"github.com/asdine/storm/v3/codec/json"
|
||||||
"github.com/asdine/storm/q"
|
"github.com/asdine/storm/v3/q"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
4
storm.go
4
storm.go
@@ -5,8 +5,8 @@ import (
|
|||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/asdine/storm/codec"
|
"github.com/asdine/storm/v3/codec"
|
||||||
"github.com/asdine/storm/codec/json"
|
"github.com/asdine/storm/v3/codec/json"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/asdine/storm/codec/json"
|
"github.com/asdine/storm/v3/codec/json"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user