Merge pull request #367 from fkautz/pr_out_updating_iodine

master
Frederick F. Kautz IV 10 years ago
commit d6507305ac
  1. 2
      Godeps/Godeps.json
  2. 2
      Godeps/_workspace/src/github.com/minio-io/iodine/iodine.go
  3. 2
      Godeps/_workspace/src/github.com/minio-io/iodine/iodine_test.go
  4. 2
      Godeps/_workspace/src/gopkg.in/check.v1/benchmark_test.go
  5. 15
      Godeps/_workspace/src/gopkg.in/check.v1/printer_test.go
  6. 4
      pkg/storage/donut/donut.go

2
Godeps/Godeps.json generated vendored

@ -20,7 +20,7 @@
}, },
{ {
"ImportPath": "github.com/minio-io/iodine", "ImportPath": "github.com/minio-io/iodine",
"Rev": "f2dbd51c3b4f8530a9b8e2dbc32788175df2fa5c" "Rev": "d7c4850883ade19431e3808e9c712d3d3e69cdcc"
}, },
{ {
"ImportPath": "gopkg.in/check.v1", "ImportPath": "gopkg.in/check.v1",

@ -44,7 +44,7 @@ type StackEntry struct {
// Wrap an error, turning it into an iodine error. // Wrap an error, turning it into an iodine error.
// Adds an initial stack trace. // Adds an initial stack trace.
func Wrap(err error, data map[string]string) *Error { func New(err error, data map[string]string) *Error {
entry := createStackEntry() entry := createStackEntry()
for k, v := range data { for k, v := range data {
entry.Data[k] = v entry.Data[k] = v

@ -25,7 +25,7 @@ import (
) )
func TestIodine(t *testing.T) { func TestIodine(t *testing.T) {
iodineError := Wrap(errors.New("Hello"), nil) iodineError := New(errors.New("Hello"), nil)
iodineError.Annotate(nil) iodineError.Annotate(nil)
iodineError.Annotate(nil) iodineError.Annotate(nil)
iodineError.Annotate(nil) iodineError.Annotate(nil)

@ -3,8 +3,8 @@
package check_test package check_test
import ( import (
. "gopkg.in/check.v1"
"time" "time"
. "gopkg.in/check.v1"
) )
var benchmarkS = Suite(&BenchmarkS{}) var benchmarkS = Suite(&BenchmarkS{})

@ -24,27 +24,22 @@ func printTestFunc() {
println(3) // Comment3 println(3) // Comment3
} }
switch 5 { switch 5 {
case 6: case 6: println(6) // Comment6
println(6) // Comment6
println(7) println(7)
} }
switch interface{}(9).(type) {// Comment9 switch interface{}(9).(type) {// Comment9
case int: case int: println(10)
println(10)
println(11) println(11)
} }
select { select {
case <-(chan bool)(nil): case <-(chan bool)(nil): println(14)
println(14)
println(15) println(15)
default: default: println(16)
println(16)
println(17) println(17)
} }
println(19, println(19,
20) 20)
_ = func() { _ = func() { println(21)
println(21)
println(22) println(22)
} }
println(24, func() { println(24, func() {

@ -26,7 +26,7 @@ func NewDonut(root string) (Donut, *iodine.Error) {
for nodeID, node := range nodes { for nodeID, node := range nodes {
bucketIDs, err := node.GetBuckets() bucketIDs, err := node.GetBuckets()
if err != nil { if err != nil {
return nil, iodine.Wrap(err, map[string]string{"root": root}) return nil, iodine.New(err, map[string]string{"root": root})
} }
for _, bucketID := range bucketIDs { for _, bucketID := range bucketIDs {
tokens := strings.Split(bucketID, ":") tokens := strings.Split(bucketID, ":")
@ -38,7 +38,7 @@ func NewDonut(root string) (Donut, *iodine.Error) {
driver.buckets[tokens[0]] = bucket driver.buckets[tokens[0]] = bucket
} }
if err = driver.buckets[tokens[0]].AddNode(nodeID, bucketID); err != nil { if err = driver.buckets[tokens[0]].AddNode(nodeID, bucketID); err != nil {
return nil, iodine.Wrap(err, map[string]string{"root": root}) return nil, iodine.New(err, map[string]string{"root": root})
} }
} }
} }

Loading…
Cancel
Save