Skip to content

Commit

Permalink
use vgo manage deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ZHAO committed Aug 8, 2018
1 parent 3cd52a8 commit 6ab8451
Show file tree
Hide file tree
Showing 48 changed files with 38 additions and 13,035 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ _testmain.go
*.log

.tag*

main
go.sum
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ go:
- "1.10"
- master

before_install:
- go get -u golang.org/x/vgo

script:
- make test
21 changes: 0 additions & 21 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

20 changes: 6 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,17 @@ all:install

GOPATH:=$(CURDIR)/../../../../
export GOPATH
export GO15VENDOREXPERIMENT=1

godep:
which godep >/dev/null 2>&1 || go get github.com/tools/godep

savedep: godep
if [ -d "./Godeps" ]; then rm -r Godeps; fi
godep save ./...

test:
go version
go test github.com/douban/gobeansdb/memcache
go test github.com/douban/gobeansdb/loghub
go test github.com/douban/gobeansdb/cmem
go test github.com/douban/gobeansdb/quicklz
ulimit -n 1024; go test github.com/douban/gobeansdb/store
vgo test github.com/douban/gobeansdb/memcache
vgo test github.com/douban/gobeansdb/loghub
vgo test github.com/douban/gobeansdb/cmem
vgo test github.com/douban/gobeansdb/quicklz
ulimit -n 1024; vgo test github.com/douban/gobeansdb/store

pytest:install
./tests/run_test.sh

install:
go install github.com/douban/gobeansdb/gobeansdb
vgo install github.com/douban/gobeansdb
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Yet anonther distributed key-value storage system from Douban Inc.

# Prepare

GoBeansDB use `vgo` manage dependencies, please install vgo first.

# Install

```shell
Expand Down
2 changes: 1 addition & 1 deletion config/zk.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func UpdateLocalRoute(content []byte) {
log.Printf("update local route %s", LocalRoutePath)
fd, err := os.OpenFile(LocalRoutePath, os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
log.Fatalf("fail to write", LocalRoutePath)
log.Fatalf("fail to write: %s", LocalRoutePath)
}
fd.Write(content)
fd.Close()
Expand Down
7 changes: 7 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module github.com/douban/gobeansdb

require (
github.com/samuel/go-zookeeper v0.0.0-20151102234400-218e9c81c0dd
github.com/spaolacci/murmur3 v0.0.0-20150829172844-0d12bf811670
gopkg.in/yaml.v2 v2.0.0-20151201162745-f7716cbe52ba
)
2 changes: 1 addition & 1 deletion gobeansdb/config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package gobeansdb

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion gobeansdb/config_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package gobeansdb

import (
"bytes"
Expand Down
4 changes: 2 additions & 2 deletions gobeansdb/main.go → gobeansdb/gobeansdb.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package gobeansdb

import (
"flag"
Expand All @@ -20,7 +20,7 @@ var (
logger = loghub.ErrorLogger
)

func main() {
func Main() {
var version = flag.Bool("version", false, "print version of gobeansdb")
var confdir = flag.String("confdir", "", "path of server config dir")
var dumpconf = flag.Bool("dumpconf", false, "print configuration")
Expand Down
2 changes: 1 addition & 1 deletion gobeansdb/store.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package gobeansdb

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion gobeansdb/web.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package gobeansdb

import (
"encoding/json"
Expand Down
9 changes: 9 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package main

import (
"github.com/douban/gobeansdb/gobeansdb"
)

func main() {
gobeansdb.Main()
}
25 changes: 0 additions & 25 deletions vendor/github.com/samuel/go-zookeeper/LICENSE

This file was deleted.

Loading

0 comments on commit 6ab8451

Please sign in to comment.