Skip to content

Commit

Permalink
Switch to go mod (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
overvenus authored and siddontang committed Dec 5, 2018
1 parent 703760e commit 4f034a4
Show file tree
Hide file tree
Showing 1,102 changed files with 227 additions and 702,603 deletions.
406 changes: 0 additions & 406 deletions Gopkg.lock

This file was deleted.

47 changes: 0 additions & 47 deletions Gopkg.toml

This file was deleted.

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ build: chaos verifier
chaos: rawkv tidb txnkv

tidb:
go build -o bin/chaos-tidb cmd/tidb/main.go
GO111MODULE=on go build -o bin/chaos-tidb cmd/tidb/main.go

rawkv:
go build -o bin/chaos-rawkv cmd/rawkv/main.go
GO111MODULE=on go build -o bin/chaos-rawkv cmd/rawkv/main.go

txnkv:
go build -o bin/chaos-txnkv cmd/txnkv/main.go
GO111MODULE=on go build -o bin/chaos-txnkv cmd/txnkv/main.go

verifier:
go build -o bin/chaos-verifier cmd/verifier/main.go
GO111MODULE=on go build -o bin/chaos-verifier cmd/verifier/main.go
1 change: 0 additions & 1 deletion Porcupine-LICENSE

This file was deleted.

22 changes: 22 additions & 0 deletions Porcupine-LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)
=====================

**Copyright (c) 2017-2018 Anish Athalye ([email protected])**

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 3 additions & 4 deletions db/tidb/bank.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"time"

"github.com/anishathalye/porcupine"
"github.com/juju/errors"
pchecker "github.com/siddontang/chaos/pkg/check/porcupine"
"github.com/siddontang/chaos/pkg/core"
"github.com/siddontang/chaos/pkg/history"
Expand Down Expand Up @@ -172,21 +171,21 @@ func (c *bankClient) DumpState(ctx context.Context) (interface{}, error) {
txn, err := c.db.Begin()

if err != nil {
return nil, errors.Trace(err)
return nil, err
}
defer txn.Rollback()

rows, err := txn.QueryContext(ctx, "select balance from accounts")
if err != nil {
return nil, errors.Trace(err)
return nil, err
}
defer rows.Close()

balances := make([]int64, 0, c.accountNum)
for rows.Next() {
var v int64
if err = rows.Scan(&v); err != nil {
return nil, errors.Trace(err)
return nil, err
}
balances = append(balances, v)
}
Expand Down
3 changes: 1 addition & 2 deletions db/tidb/multi_bank.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"math/rand"
"time"

"github.com/juju/errors"
"github.com/siddontang/chaos/pkg/core"
)

Expand Down Expand Up @@ -158,7 +157,7 @@ func (c *multiBankClient) DumpState(ctx context.Context) (interface{}, error) {
txn, err := c.db.Begin()

if err != nil {
return nil, errors.Trace(err)
return nil, err
}
defer txn.Rollback()

Expand Down
4 changes: 2 additions & 2 deletions docker/control/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.10
FROM golang:1.11
MAINTAINER [email protected]

RUN apt-get -y -q update && \
Expand All @@ -8,7 +8,7 @@ RUN apt-get -y -q update && \
git \
gnuplot \
wget \
vim # not required by chaos itself, just for ease of use
less vim # not required by chaos itself, just for ease of use

# You need to locate chaos in this directory (up.sh does that automatically)
ADD chaos /go/src/github.com/siddontang/chaos
Expand Down
16 changes: 16 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module github.com/siddontang/chaos

require (
github.com/anishathalye/porcupine v0.0.0-20180912012540-c95d370e6abb
github.com/coreos/bbolt v1.3.1-coreos.6 // indirect
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect
github.com/go-sql-driver/mysql v1.4.1
github.com/pingcap/kvproto v0.0.0-20181130084342-6bbef21532da // indirect
github.com/pingcap/tidb v0.0.0-20181203021530-741adcee43e2
github.com/pingcap/tipb v0.0.0-20181126132056-a7fd2aaa9719 // indirect
github.com/prometheus/client_golang v0.9.1 // indirect
github.com/prometheus/common v0.0.0-20181126121408-4724e9255275 // indirect
github.com/prometheus/procfs v0.0.0-20181129180645-aa55a523dc0a // indirect
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc // indirect
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f // indirect
)
Loading

0 comments on commit 4f034a4

Please sign in to comment.