Skip to content

Commit

Permalink
release badger v2.0.0
Browse files Browse the repository at this point in the history
Modify the import path on go.mod and every internal reference.
  • Loading branch information
campoy committed Jun 20, 2019
1 parent 6a824d0 commit e051fef
Show file tree
Hide file tree
Showing 46 changed files with 94 additions and 94 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ few months. The [Changelog] is kept fairly up-to-date.
To start using Badger, install Go 1.8 or above and run `go get`:

```sh
$ go get github.com/dgraph-io/badger/...
$ go get github.com/dgraph-io/badger/v2/...
```

This will retrieve the library and install the `badger` command line
Expand All @@ -76,7 +76,7 @@ package main
import (
"log"

"github.com/dgraph-io/badger"
badger "github.com/dgraph-io/badger/v2"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ build_script:
test_script:
# Unit tests
- ps: Add-AppveyorTest "Unit Tests" -Outcome Running
- go test -v github.com/dgraph-io/badger/...
- go test -v -vlog_mmap=false github.com/dgraph-io/badger/...
- go test -v github.com/dgraph-io/badger/v2/...
- go test -v -vlog_mmap=false github.com/dgraph-io/badger/v2/...
- ps: Update-AppveyorTest "Unit Tests" -Outcome Passed

notifications:
Expand Down
4 changes: 2 additions & 2 deletions backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"encoding/binary"
"io"

"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
)

// Backup is a wrapper function over Stream.Backup to generate full and incremental backups of the
Expand Down
2 changes: 1 addition & 1 deletion backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"testing"
"time"

"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/v2/pb"
"github.com/stretchr/testify/require"
)

Expand Down
4 changes: 2 additions & 2 deletions badger/cmd/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"bufio"
"os"

"github.com/dgraph-io/badger"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/y"
"github.com/spf13/cobra"
)

Expand Down
8 changes: 4 additions & 4 deletions badger/cmd/bank.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import (
"sync/atomic"
"time"

"github.com/dgraph-io/badger"
"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion badger/cmd/flatten.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package cmd

import (
"github.com/dgraph-io/badger"
"github.com/dgraph-io/badger/v2"
"github.com/spf13/cobra"
)

Expand Down
8 changes: 4 additions & 4 deletions badger/cmd/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ import (

"github.com/pkg/errors"

"github.com/dgraph-io/badger"
"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/table"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
humanize "github.com/dustin/go-humanize"
"github.com/spf13/cobra"
)
Expand Down
8 changes: 4 additions & 4 deletions badger/cmd/read_bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import (
humanize "github.com/dustin/go-humanize"
"github.com/spf13/cobra"

"github.com/dgraph-io/badger"
"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
)

var readBenchCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion badger/cmd/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"os"
"path"

"github.com/dgraph-io/badger"
"github.com/dgraph-io/badger/v2"
"github.com/spf13/cobra"
)

Expand Down
6 changes: 3 additions & 3 deletions badger/cmd/write_bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
humanize "github.com/dustin/go-humanize"
"github.com/spf13/cobra"

"github.com/dgraph-io/badger"
"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
)

var writeBenchCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion badger/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
_ "net/http/pprof"
"runtime"

"github.com/dgraph-io/badger/badger/cmd"
"github.com/dgraph-io/badger/v2/badger/cmd"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package badger
import (
"sync"

"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/y"
)

// WriteBatch holds the necessary info to perform batched writes.
Expand Down
4 changes: 2 additions & 2 deletions compaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (

"golang.org/x/net/trace"

"github.com/dgraph-io/badger/table"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
)

type keyRange struct {
Expand Down
10 changes: 5 additions & 5 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ import (
"sync/atomic"
"time"

"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/skl"
"github.com/dgraph-io/badger/table"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/skl"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
humanize "github.com/dustin/go-humanize"
"github.com/pkg/errors"
"golang.org/x/net/trace"
Expand Down
8 changes: 4 additions & 4 deletions db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ import (
"testing"
"time"

"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/skl"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/skl"

"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/y"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/dgraph-io/badger
module github.com/dgraph-io/badger/v2

require (
github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7
Expand Down
6 changes: 3 additions & 3 deletions integration/testgc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"sync/atomic"
"time"

"github.com/dgraph-io/badger"
"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/y"
)

var maxValue int64 = 10000000
Expand Down
6 changes: 3 additions & 3 deletions iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"sync/atomic"
"time"

"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/table"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/table"

"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/y"
)

type prefetchStatus uint8
Expand Down
6 changes: 3 additions & 3 deletions iterator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"strings"
"testing"

"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/y"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -162,7 +162,7 @@ func TestIteratePrefix(t *testing.T) {
// Benchmark with NO opt.Prefix set ===
// goos: linux
// goarch: amd64
// pkg: github.com/dgraph-io/badger
// pkg: github.com/dgraph-io/badger/v2
// BenchmarkIteratePrefixSingleKey/Key_lookups-4 10000 460924 ns/op
// --- BENCH: BenchmarkIteratePrefixSingleKey/Key_lookups-4
// iterator_test.go:147: Inner b.N: 1
Expand Down
4 changes: 2 additions & 2 deletions level_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"sort"
"sync"

"github.com/dgraph-io/badger/table"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"github.com/pkg/errors"
)

Expand Down
6 changes: 3 additions & 3 deletions levels.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import (

"golang.org/x/net/trace"

"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/table"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion managed_db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"testing"
"time"

"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/y"
"github.com/stretchr/testify/require"
)

Expand Down
4 changes: 2 additions & 2 deletions manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"path/filepath"
"sync"

"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"github.com/pkg/errors"
)

Expand Down
8 changes: 4 additions & 4 deletions manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import (

"golang.org/x/net/trace"

"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/table"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/table"
"github.com/dgraph-io/badger/v2/y"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"sync"
"time"

"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/y"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package badger

import (
"github.com/dgraph-io/badger/options"
"github.com/dgraph-io/badger/v2/options"
)

// NOTE: Keep the comments in the following to 75 chars width, so they
Expand Down
4 changes: 2 additions & 2 deletions publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"bytes"
"sync"

"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
)

type subscriber struct {
Expand Down
2 changes: 1 addition & 1 deletion publisher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/v2/pb"
)

func TestPublisherOrdering(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion skl/arena.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"sync/atomic"
"unsafe"

"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/y"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion skl/skl.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"sync/atomic"
"unsafe"

"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/y"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion skl/skl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/y"
)

const arenaSize = 1 << 20
Expand Down
4 changes: 2 additions & 2 deletions stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"sync/atomic"
"time"

"github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
humanize "github.com/dustin/go-humanize"
)

Expand Down
4 changes: 2 additions & 2 deletions stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"strings"
"testing"

bpb "github.com/dgraph-io/badger/pb"
"github.com/dgraph-io/badger/y"
bpb "github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/badger/v2/y"
"github.com/stretchr/testify/require"
)

Expand Down
Loading

0 comments on commit e051fef

Please sign in to comment.