Fix gomod (#379)

This commit is contained in:
Lunny Xiao 2020-04-24 14:10:03 +08:00 committed by GitHub
parent 1b73a3d5bb
commit 4c786878af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
66 changed files with 96 additions and 93 deletions

View File

@ -3,8 +3,8 @@ package main
import ( import (
"flag" "flag"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
"github.com/siddontang/ledisdb/ledis" "github.com/ledisdb/ledisdb/ledis"
) )
var configPath = flag.String("config", "", "ledisdb config file") var configPath = flag.String("config", "", "ledisdb config file")

View File

@ -3,8 +3,8 @@ package main
import ( import (
"flag" "flag"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
"github.com/siddontang/ledisdb/store" "github.com/ledisdb/ledisdb/store"
) )
var fileName = flag.String("config", "", "ledisdb config file") var fileName = flag.String("config", "", "ledisdb config file")

View File

@ -12,8 +12,8 @@ import (
"strings" "strings"
"syscall" "syscall"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
"github.com/siddontang/ledisdb/server" "github.com/ledisdb/ledisdb/server"
) )
var configFile = flag.String("config", "", "ledisdb config file") var configFile = flag.String("config", "", "ledisdb config file")

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/siddontang/ledisdb module github.com/ledisdb/ledisdb
go 1.12 go 1.12

View File

@ -3,9 +3,9 @@ package ledis
import ( import (
"sync" "sync"
"github.com/ledisdb/ledisdb/rpl"
"github.com/ledisdb/ledisdb/store"
"github.com/siddontang/go/log" "github.com/siddontang/go/log"
"github.com/siddontang/ledisdb/rpl"
"github.com/siddontang/ledisdb/store"
) )
type batch struct { type batch struct {

View File

@ -7,8 +7,8 @@ import (
"io" "io"
"os" "os"
"github.com/ledisdb/ledisdb/store"
"github.com/siddontang/go/snappy" "github.com/siddontang/go/snappy"
"github.com/siddontang/ledisdb/store"
) )
// DumpHead is the head of a dump. // DumpHead is the head of a dump.

View File

@ -5,8 +5,8 @@ import (
"os" "os"
"testing" "testing"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
"github.com/siddontang/ledisdb/store" "github.com/ledisdb/ledisdb/store"
) )
func TestDump(t *testing.T) { func TestDump(t *testing.T) {

View File

@ -8,11 +8,11 @@ import (
"sync" "sync"
"time" "time"
"github.com/ledisdb/ledisdb/config"
"github.com/ledisdb/ledisdb/rpl"
"github.com/ledisdb/ledisdb/store"
"github.com/siddontang/go/filelock" "github.com/siddontang/go/filelock"
"github.com/siddontang/go/log" "github.com/siddontang/go/log"
"github.com/siddontang/ledisdb/config"
"github.com/siddontang/ledisdb/rpl"
"github.com/siddontang/ledisdb/store"
) )
// Ledis is the core structure to handle the database. // Ledis is the core structure to handle the database.

View File

@ -6,7 +6,7 @@ import (
"fmt" "fmt"
"sync" "sync"
"github.com/siddontang/ledisdb/store" "github.com/ledisdb/ledisdb/store"
) )
type ibucket interface { type ibucket interface {

View File

@ -5,7 +5,7 @@ import (
"sync" "sync"
"testing" "testing"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
) )
var testLedis *Ledis var testLedis *Ledis

View File

@ -4,7 +4,7 @@ import (
"os" "os"
"testing" "testing"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
) )
func TestMigrate(t *testing.T) { func TestMigrate(t *testing.T) {

View File

@ -6,10 +6,10 @@ import (
"io" "io"
"time" "time"
"github.com/ledisdb/ledisdb/rpl"
"github.com/ledisdb/ledisdb/store"
"github.com/siddontang/go/log" "github.com/siddontang/go/log"
"github.com/siddontang/go/snappy" "github.com/siddontang/go/snappy"
"github.com/siddontang/ledisdb/rpl"
"github.com/siddontang/ledisdb/store"
) )
const ( const (

View File

@ -6,8 +6,8 @@ import (
"os" "os"
"testing" "testing"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
"github.com/siddontang/ledisdb/store" "github.com/ledisdb/ledisdb/store"
) )
func checkLedisEqual(master *Ledis, slave *Ledis) error { func checkLedisEqual(master *Ledis, slave *Ledis) error {

View File

@ -4,7 +4,7 @@ import (
"errors" "errors"
"regexp" "regexp"
"github.com/siddontang/ledisdb/store" "github.com/ledisdb/ledisdb/store"
) )
var errDataType = errors.New("error data type") var errDataType = errors.New("error data type")

View File

@ -6,7 +6,7 @@ import (
"sort" "sort"
"strconv" "strconv"
"github.com/siddontang/ledisdb/store" "github.com/ledisdb/ledisdb/store"
) )
// Limit is for sort. // Limit is for sort.

View File

@ -5,8 +5,8 @@ import (
"errors" "errors"
"time" "time"
"github.com/ledisdb/ledisdb/store"
"github.com/siddontang/go/num" "github.com/siddontang/go/num"
"github.com/siddontang/ledisdb/store"
) )
// FVPair is the pair of field and value. // FVPair is the pair of field and value.

View File

@ -7,8 +7,8 @@ import (
"strings" "strings"
"time" "time"
"github.com/ledisdb/ledisdb/store"
"github.com/siddontang/go/num" "github.com/siddontang/go/num"
"github.com/siddontang/ledisdb/store"
) )
// KVPair is the pair of key-value. // KVPair is the pair of key-value.

View File

@ -7,10 +7,10 @@ import (
"sync" "sync"
"time" "time"
"github.com/ledisdb/ledisdb/store"
"github.com/siddontang/go/hack" "github.com/siddontang/go/hack"
"github.com/siddontang/go/log" "github.com/siddontang/go/log"
"github.com/siddontang/go/num" "github.com/siddontang/go/num"
"github.com/siddontang/ledisdb/store"
"golang.org/x/net/context" "golang.org/x/net/context"
) )

View File

@ -5,8 +5,8 @@ import (
"errors" "errors"
"time" "time"
"github.com/ledisdb/ledisdb/store"
"github.com/siddontang/go/hack" "github.com/siddontang/go/hack"
"github.com/siddontang/ledisdb/store"
) )
var errSetKey = errors.New("invalid set key") var errSetKey = errors.New("invalid set key")

View File

@ -6,7 +6,7 @@ import (
"sync" "sync"
"time" "time"
"github.com/siddontang/ledisdb/store" "github.com/ledisdb/ledisdb/store"
) )
var ( var (

View File

@ -6,8 +6,8 @@ import (
"errors" "errors"
"time" "time"
"github.com/ledisdb/ledisdb/store"
"github.com/siddontang/go/hack" "github.com/siddontang/go/hack"
"github.com/siddontang/ledisdb/store"
) )
// For zset const. // For zset const.

View File

@ -5,7 +5,7 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/siddontang/ledisdb/store" "github.com/ledisdb/ledisdb/store"
) )
const ( const (

View File

@ -8,9 +8,9 @@ import (
"sync" "sync"
"time" "time"
"github.com/ledisdb/ledisdb/config"
"github.com/siddontang/go/log" "github.com/siddontang/go/log"
"github.com/siddontang/go/num" "github.com/siddontang/go/num"
"github.com/siddontang/ledisdb/config"
) )
const ( const (
@ -38,7 +38,7 @@ const (
meta: log1 offset | log2 offset meta: log1 offset | log2 offset
log offset: bigendian uint32 | bigendian uint32 log offset: bigendian uint32 | bigendian uint32
//sha1 of github.com/siddontang/ledisdb 20 bytes //sha1 of github.com/ledisdb/ledisdb 20 bytes
magic data = "\x1c\x1d\xb8\x88\xff\x9e\x45\x55\x40\xf0\x4c\xda\xe0\xce\x47\xde\x65\x48\x71\x17" magic data = "\x1c\x1d\xb8\x88\xff\x9e\x45\x55\x40\xf0\x4c\xda\xe0\xce\x47\xde\x65\x48\x71\x17"
we must guarantee that the log id is monotonic increment strictly. we must guarantee that the log id is monotonic increment strictly.

View File

@ -7,9 +7,9 @@ import (
"sync" "sync"
"time" "time"
"github.com/ledisdb/ledisdb/config"
"github.com/ledisdb/ledisdb/store"
"github.com/siddontang/go/num" "github.com/siddontang/go/num"
"github.com/siddontang/ledisdb/config"
"github.com/siddontang/ledisdb/store"
) )
type GoLevelDBStore struct { type GoLevelDBStore struct {

View File

@ -7,9 +7,9 @@ import (
"sync" "sync"
"time" "time"
"github.com/ledisdb/ledisdb/config"
"github.com/siddontang/go/log" "github.com/siddontang/go/log"
"github.com/siddontang/go/snappy" "github.com/siddontang/go/snappy"
"github.com/siddontang/ledisdb/config"
) )
type Stat struct { type Stat struct {

View File

@ -5,7 +5,7 @@ import (
"os" "os"
"testing" "testing"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
) )
func TestReplication(t *testing.T) { func TestReplication(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
"os" "os"
"testing" "testing"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
) )
func TestGoLevelDBStore(t *testing.T) { func TestGoLevelDBStore(t *testing.T) {

View File

@ -11,9 +11,10 @@ import (
"sync" "sync"
"crypto/tls" "crypto/tls"
"github.com/ledisdb/ledisdb/config"
"github.com/ledisdb/ledisdb/ledis"
"github.com/siddontang/goredis" "github.com/siddontang/goredis"
"github.com/siddontang/ledisdb/config"
"github.com/siddontang/ledisdb/ledis"
) )
type App struct { type App struct {

View File

@ -5,8 +5,8 @@ import (
"sync" "sync"
"testing" "testing"
"github.com/ledisdb/ledisdb/config"
"github.com/siddontang/goredis" "github.com/siddontang/goredis"
"github.com/siddontang/ledisdb/config"
) )
var testAppOnce sync.Once var testAppOnce sync.Once

View File

@ -7,8 +7,8 @@ import (
"strings" "strings"
"time" "time"
"github.com/ledisdb/ledisdb/ledis"
"github.com/siddontang/go/sync2" "github.com/siddontang/go/sync2"
"github.com/siddontang/ledisdb/ledis"
) )
type responseWriter interface { type responseWriter interface {

View File

@ -8,10 +8,10 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/ledisdb/ledisdb/ledis"
"github.com/siddontang/go/bson" "github.com/siddontang/go/bson"
"github.com/siddontang/go/hack" "github.com/siddontang/go/hack"
"github.com/siddontang/go/log" "github.com/siddontang/go/log"
"github.com/siddontang/ledisdb/ledis"
"github.com/ugorji/go/codec" "github.com/ugorji/go/codec"
) )

View File

@ -12,11 +12,11 @@ import (
"syscall" "syscall"
"time" "time"
"github.com/ledisdb/ledisdb/ledis"
"github.com/siddontang/go/hack" "github.com/siddontang/go/hack"
"github.com/siddontang/go/log" "github.com/siddontang/go/log"
"github.com/siddontang/go/num" "github.com/siddontang/go/num"
"github.com/siddontang/goredis" "github.com/siddontang/goredis"
"github.com/siddontang/ledisdb/ledis"
) )
var errReadRequest = errors.New("invalid request protocol") var errReadRequest = errors.New("invalid request protocol")

View File

@ -1,7 +1,7 @@
package server package server
import ( import (
"github.com/siddontang/ledisdb/ledis" "github.com/ledisdb/ledisdb/ledis"
) )
func hsetCommand(c *client) error { func hsetCommand(c *client) error {

View File

@ -3,7 +3,7 @@ package server
import ( import (
"strconv" "strconv"
"github.com/siddontang/ledisdb/ledis" "github.com/ledisdb/ledisdb/ledis"
) )
// func getCommand(c *client) error { // func getCommand(c *client) error {

View File

@ -5,8 +5,9 @@ import (
"time" "time"
"bytes" "bytes"
"github.com/ledisdb/ledisdb/ledis"
"github.com/siddontang/go/hack" "github.com/siddontang/go/hack"
"github.com/siddontang/ledisdb/ledis"
) )
func lpushCommand(c *client) error { func lpushCommand(c *client) error {

View File

@ -7,10 +7,10 @@ import (
"sync" "sync"
"time" "time"
"github.com/ledisdb/ledisdb/ledis"
"github.com/siddontang/go/hack" "github.com/siddontang/go/hack"
"github.com/siddontang/go/log" "github.com/siddontang/go/log"
"github.com/siddontang/goredis" "github.com/siddontang/goredis"
"github.com/siddontang/ledisdb/ledis"
) )
func dumpCommand(c *client) error { func dumpCommand(c *client) error {

View File

@ -6,8 +6,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/ledisdb/ledisdb/config"
"github.com/siddontang/goredis" "github.com/siddontang/goredis"
"github.com/siddontang/ledisdb/config"
) )
func TestDumpRestore(t *testing.T) { func TestDumpRestore(t *testing.T) {

View File

@ -8,9 +8,9 @@ import (
"strings" "strings"
"time" "time"
"github.com/ledisdb/ledisdb/ledis"
"github.com/siddontang/go/hack" "github.com/siddontang/go/hack"
"github.com/siddontang/go/num" "github.com/siddontang/go/num"
"github.com/siddontang/ledisdb/ledis"
) )
func slaveofCommand(c *client) error { func slaveofCommand(c *client) error {

View File

@ -7,8 +7,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/ledisdb/ledisdb/config"
"github.com/siddontang/goredis" "github.com/siddontang/goredis"
"github.com/siddontang/ledisdb/config"
) )
func checkDataEqual(master *App, slave *App) error { func checkDataEqual(master *App, slave *App) error {

View File

@ -6,9 +6,9 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/ledisdb/ledisdb/ledis"
"github.com/siddontang/go/hack" "github.com/siddontang/go/hack"
"github.com/siddontang/go/num" "github.com/siddontang/go/num"
"github.com/siddontang/ledisdb/ledis"
) )
func parseXScanArgs(args [][]byte) (cursor []byte, match string, count int, desc bool, err error) { func parseXScanArgs(args [][]byte) (cursor []byte, match string, count int, desc bool, err error) {

View File

@ -5,8 +5,8 @@ import (
"os" "os"
"testing" "testing"
"github.com/ledisdb/ledisdb/config"
"github.com/siddontang/goredis" "github.com/siddontang/goredis"
"github.com/siddontang/ledisdb/config"
) )
func TestScan(t *testing.T) { func TestScan(t *testing.T) {

View File

@ -4,10 +4,11 @@ import (
"github.com/siddontang/go/hack" "github.com/siddontang/go/hack"
"github.com/siddontang/go/num" "github.com/siddontang/go/num"
"github.com/siddontang/ledisdb/config"
"strconv" "strconv"
"strings" "strings"
"time" "time"
"github.com/ledisdb/ledisdb/config"
) )
func pingCommand(c *client) error { func pingCommand(c *client) error {

View File

@ -1,7 +1,7 @@
package server package server
import ( import (
"github.com/siddontang/ledisdb/ledis" "github.com/ledisdb/ledisdb/ledis"
) )
func saddCommand(c *client) error { func saddCommand(c *client) error {

View File

@ -6,10 +6,10 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/ledisdb/ledisdb/ledis"
"github.com/ledisdb/ledisdb/store"
"github.com/siddontang/go/hack" "github.com/siddontang/go/hack"
"github.com/siddontang/go/num" "github.com/siddontang/go/num"
"github.com/siddontang/ledisdb/ledis"
"github.com/siddontang/ledisdb/store"
) )
//for simple implementation, we only support int64 score //for simple implementation, we only support int64 score

View File

@ -3,7 +3,7 @@ package server
import ( import (
"errors" "errors"
"github.com/siddontang/ledisdb/ledis" "github.com/ledisdb/ledisdb/ledis"
) )
var ( var (

View File

@ -10,8 +10,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/ledisdb/ledisdb/ledis"
"github.com/siddontang/go/sync2" "github.com/siddontang/go/sync2"
"github.com/siddontang/ledisdb/ledis"
) )
type info struct { type info struct {

View File

@ -11,12 +11,12 @@ import (
"sync" "sync"
"time" "time"
"github.com/ledisdb/ledisdb/ledis"
"github.com/ledisdb/ledisdb/rpl"
"github.com/siddontang/go/log" "github.com/siddontang/go/log"
"github.com/siddontang/go/num" "github.com/siddontang/go/num"
"github.com/siddontang/go/sync2" "github.com/siddontang/go/sync2"
"github.com/siddontang/goredis" "github.com/siddontang/goredis"
"github.com/siddontang/ledisdb/ledis"
"github.com/siddontang/ledisdb/rpl"
) )
var ( var (

View File

@ -8,10 +8,10 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/ledisdb/ledisdb/ledis"
"github.com/siddontang/go/hack" "github.com/siddontang/go/hack"
"github.com/siddontang/go/num" "github.com/siddontang/go/num"
"github.com/siddontang/ledisdb/ledis" lua "github.com/yuin/gopher-lua"
"github.com/yuin/gopher-lua"
luajson "github.com/glendc/gopher-json" luajson "github.com/glendc/gopher-json"
) )

View File

@ -3,8 +3,8 @@ package server
import ( import (
"fmt" "fmt"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
"github.com/yuin/gopher-lua" lua "github.com/yuin/gopher-lua"
"testing" "testing"
) )

View File

@ -10,8 +10,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/ledisdb/ledisdb/config"
"github.com/siddontang/go/log" "github.com/siddontang/go/log"
"github.com/siddontang/ledisdb/config"
) )
const ( const (

View File

@ -7,7 +7,7 @@ import (
"path" "path"
"testing" "testing"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
) )
type testSnapshotDumper struct { type testSnapshotDumper struct {

View File

@ -4,8 +4,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
"github.com/siddontang/ledisdb/store/driver" "github.com/ledisdb/ledisdb/store/driver"
) )
type DB struct { type DB struct {

View File

@ -3,7 +3,7 @@ package driver
import ( import (
"fmt" "fmt"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
) )
type Store interface { type Store interface {

View File

@ -8,8 +8,8 @@ import (
"github.com/syndtr/goleveldb/leveldb/storage" "github.com/syndtr/goleveldb/leveldb/storage"
"github.com/syndtr/goleveldb/leveldb/util" "github.com/syndtr/goleveldb/leveldb/util"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
"github.com/siddontang/ledisdb/store/driver" "github.com/ledisdb/ledisdb/store/driver"
"os" "os"
) )

View File

@ -1,7 +1,7 @@
package goleveldb package goleveldb
import ( import (
"github.com/siddontang/ledisdb/store/driver" "github.com/ledisdb/ledisdb/store/driver"
"github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb"
) )

View File

@ -3,7 +3,7 @@ package store
import ( import (
"bytes" "bytes"
"github.com/siddontang/ledisdb/store/driver" "github.com/ledisdb/ledisdb/store/driver"
) )
const ( const (

View File

@ -15,8 +15,8 @@ import (
"runtime" "runtime"
"unsafe" "unsafe"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
"github.com/siddontang/ledisdb/store/driver" "github.com/ledisdb/ledisdb/store/driver"
) )
const defaultFilterBits int = 10 const defaultFilterBits int = 10

View File

@ -7,7 +7,7 @@ package leveldb
import "C" import "C"
import ( import (
"github.com/siddontang/ledisdb/store/driver" "github.com/ledisdb/ledisdb/store/driver"
) )
type Snapshot struct { type Snapshot struct {

View File

@ -16,8 +16,8 @@ import (
"runtime" "runtime"
"unsafe" "unsafe"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
"github.com/siddontang/ledisdb/store/driver" "github.com/ledisdb/ledisdb/store/driver"
) )
const defaultFilterBits int = 10 const defaultFilterBits int = 10

View File

@ -7,7 +7,7 @@ package rocksdb
import "C" import "C"
import ( import (
"github.com/siddontang/ledisdb/store/driver" "github.com/ledisdb/ledisdb/store/driver"
) )
type Snapshot struct { type Snapshot struct {

View File

@ -1,7 +1,7 @@
package store package store
import ( import (
"github.com/siddontang/ledisdb/store/driver" "github.com/ledisdb/ledisdb/store/driver"
) )
type Slice interface { type Slice interface {

View File

@ -1,7 +1,7 @@
package store package store
import ( import (
"github.com/siddontang/ledisdb/store/driver" "github.com/ledisdb/ledisdb/store/driver"
) )
type Snapshot struct { type Snapshot struct {

View File

@ -5,12 +5,12 @@ import (
"os" "os"
"path" "path"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
"github.com/siddontang/ledisdb/store/driver" "github.com/ledisdb/ledisdb/store/driver"
_ "github.com/siddontang/ledisdb/store/goleveldb" _ "github.com/ledisdb/ledisdb/store/goleveldb"
_ "github.com/siddontang/ledisdb/store/leveldb" _ "github.com/ledisdb/ledisdb/store/leveldb"
_ "github.com/siddontang/ledisdb/store/rocksdb" _ "github.com/ledisdb/ledisdb/store/rocksdb"
) )
func getStorePath(cfg *config.Config) string { func getStorePath(cfg *config.Config) string {

View File

@ -7,8 +7,8 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
"github.com/siddontang/ledisdb/store/driver" "github.com/ledisdb/ledisdb/store/driver"
) )
func TestStore(t *testing.T) { func TestStore(t *testing.T) {

View File

@ -3,7 +3,7 @@ package store
import ( import (
"time" "time"
"github.com/siddontang/ledisdb/store/driver" "github.com/ledisdb/ledisdb/store/driver"
"github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb"
) )

View File

@ -5,9 +5,9 @@ import (
"flag" "flag"
"fmt" "fmt"
"github.com/siddontang/ledisdb/config" "github.com/ledisdb/ledisdb/config"
"github.com/siddontang/ledisdb/ledis" "github.com/ledisdb/ledisdb/ledis"
"github.com/siddontang/ledisdb/store" "github.com/ledisdb/ledisdb/store"
) )
var configPath = flag.String("config", "", "ledisdb config file") var configPath = flag.String("config", "", "ledisdb config file")