use semantic import versioning as required by go

This commit is contained in:
Jonathan Chappelow
2019-09-30 13:45:14 -05:00
parent a53b1e41fe
commit e6733e15b5
29 changed files with 60 additions and 58 deletions

View File

@@ -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))

View File

@@ -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() {

View File

@@ -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) {

View File

@@ -5,7 +5,7 @@ import (
"reflect"
"testing"
"github.com/asdine/storm/codec"
"github.com/asdine/storm/v3/codec"
)
type testStruct struct {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -6,7 +6,7 @@ import (
"strconv"
"strings"
"github.com/asdine/storm/index"
"github.com/asdine/storm/v3/index"
bolt "go.etcd.io/bbolt"
)

View File

@@ -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
View File

@@ -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

View File

@@ -3,7 +3,7 @@ package index
import (
"bytes"
"github.com/asdine/storm/internal"
"github.com/asdine/storm/v3/internal"
bolt "go.etcd.io/bbolt"
)

View File

@@ -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"
)

View File

@@ -3,7 +3,7 @@ package index
import (
"bytes"
"github.com/asdine/storm/internal"
"github.com/asdine/storm/v3/internal"
bolt "go.etcd.io/bbolt"
)

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -1,7 +1,7 @@
package storm
import (
"github.com/asdine/storm/codec"
"github.com/asdine/storm/v3/codec"
bolt "go.etcd.io/bbolt"
)

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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() {

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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"
)