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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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