diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 49451af16..9e9398a12 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -20,7 +20,7 @@ }, { "ImportPath": "github.com/minio-io/iodine", - "Rev": "f2dbd51c3b4f8530a9b8e2dbc32788175df2fa5c" + "Rev": "d7c4850883ade19431e3808e9c712d3d3e69cdcc" }, { "ImportPath": "gopkg.in/check.v1", diff --git a/Godeps/_workspace/src/github.com/minio-io/iodine/iodine.go b/Godeps/_workspace/src/github.com/minio-io/iodine/iodine.go index 9cc31cecc..f9e29347e 100644 --- a/Godeps/_workspace/src/github.com/minio-io/iodine/iodine.go +++ b/Godeps/_workspace/src/github.com/minio-io/iodine/iodine.go @@ -44,7 +44,7 @@ type StackEntry struct { // Wrap an error, turning it into an iodine error. // 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() for k, v := range data { entry.Data[k] = v diff --git a/Godeps/_workspace/src/github.com/minio-io/iodine/iodine_test.go b/Godeps/_workspace/src/github.com/minio-io/iodine/iodine_test.go index e14faf59c..c7f539512 100644 --- a/Godeps/_workspace/src/github.com/minio-io/iodine/iodine_test.go +++ b/Godeps/_workspace/src/github.com/minio-io/iodine/iodine_test.go @@ -25,7 +25,7 @@ import ( ) 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) diff --git a/Godeps/_workspace/src/gopkg.in/check.v1/benchmark_test.go b/Godeps/_workspace/src/gopkg.in/check.v1/benchmark_test.go index 0114c5b1a..4dd827c16 100644 --- a/Godeps/_workspace/src/gopkg.in/check.v1/benchmark_test.go +++ b/Godeps/_workspace/src/gopkg.in/check.v1/benchmark_test.go @@ -3,8 +3,8 @@ package check_test import ( - . "gopkg.in/check.v1" "time" + . "gopkg.in/check.v1" ) var benchmarkS = Suite(&BenchmarkS{}) diff --git a/Godeps/_workspace/src/gopkg.in/check.v1/printer_test.go b/Godeps/_workspace/src/gopkg.in/check.v1/printer_test.go index daa6a737a..538b2d52e 100644 --- a/Godeps/_workspace/src/gopkg.in/check.v1/printer_test.go +++ b/Godeps/_workspace/src/gopkg.in/check.v1/printer_test.go @@ -1,7 +1,7 @@ package check_test import ( - . "gopkg.in/check.v1" + . "gopkg.in/check.v1" ) var _ = Suite(&PrinterS{}) @@ -9,101 +9,96 @@ var _ = Suite(&PrinterS{}) type PrinterS struct{} func (s *PrinterS) TestCountSuite(c *C) { - suitesRun += 1 + suitesRun += 1 } var printTestFuncLine int func init() { - printTestFuncLine = getMyLine() + 3 + printTestFuncLine = getMyLine() + 3 } func printTestFunc() { - println(1) // Comment1 - if 2 == 2 { // Comment2 - println(3) // Comment3 - } - switch 5 { - case 6: - println(6) // Comment6 - println(7) - } - switch interface{}(9).(type) { // Comment9 - case int: - println(10) - println(11) - } - select { - case <-(chan bool)(nil): - println(14) - println(15) - default: - println(16) - println(17) - } - println(19, - 20) - _ = func() { - println(21) - println(22) - } - println(24, func() { - println(25) - }) - // Leading comment - // with multiple lines. - println(29) // Comment29 + println(1) // Comment1 + if 2 == 2 { // Comment2 + println(3) // Comment3 + } + switch 5 { + case 6: println(6) // Comment6 + println(7) + } + switch interface{}(9).(type) {// Comment9 + case int: println(10) + println(11) + } + select { + case <-(chan bool)(nil): println(14) + println(15) + default: println(16) + println(17) + } + println(19, + 20) + _ = func() { println(21) + println(22) + } + println(24, func() { + println(25) + }) + // Leading comment + // with multiple lines. + println(29) // Comment29 } var printLineTests = []struct { - line int - output string + line int + output string }{ - {1, "println(1) // Comment1"}, - {2, "if 2 == 2 { // Comment2\n ...\n}"}, - {3, "println(3) // Comment3"}, - {5, "switch 5 {\n...\n}"}, - {6, "case 6:\n println(6) // Comment6\n ..."}, - {7, "println(7)"}, - {9, "switch interface{}(9).(type) { // Comment9\n...\n}"}, - {10, "case int:\n println(10)\n ..."}, - {14, "case <-(chan bool)(nil):\n println(14)\n ..."}, - {15, "println(15)"}, - {16, "default:\n println(16)\n ..."}, - {17, "println(17)"}, - {19, "println(19,\n 20)"}, - {20, "println(19,\n 20)"}, - {21, "_ = func() {\n println(21)\n println(22)\n}"}, - {22, "println(22)"}, - {24, "println(24, func() {\n println(25)\n})"}, - {25, "println(25)"}, - {26, "println(24, func() {\n println(25)\n})"}, - {29, "// Leading comment\n// with multiple lines.\nprintln(29) // Comment29"}, + {1, "println(1) // Comment1"}, + {2, "if 2 == 2 { // Comment2\n ...\n}"}, + {3, "println(3) // Comment3"}, + {5, "switch 5 {\n...\n}"}, + {6, "case 6:\n println(6) // Comment6\n ..."}, + {7, "println(7)"}, + {9, "switch interface{}(9).(type) { // Comment9\n...\n}"}, + {10, "case int:\n println(10)\n ..."}, + {14, "case <-(chan bool)(nil):\n println(14)\n ..."}, + {15, "println(15)"}, + {16, "default:\n println(16)\n ..."}, + {17, "println(17)"}, + {19, "println(19,\n 20)"}, + {20, "println(19,\n 20)"}, + {21, "_ = func() {\n println(21)\n println(22)\n}"}, + {22, "println(22)"}, + {24, "println(24, func() {\n println(25)\n})"}, + {25, "println(25)"}, + {26, "println(24, func() {\n println(25)\n})"}, + {29, "// Leading comment\n// with multiple lines.\nprintln(29) // Comment29"}, } func (s *PrinterS) TestPrintLine(c *C) { - for _, test := range printLineTests { - output, err := PrintLine("printer_test.go", printTestFuncLine+test.line) - c.Assert(err, IsNil) - c.Assert(output, Equals, test.output) - } + for _, test := range printLineTests { + output, err := PrintLine("printer_test.go", printTestFuncLine+test.line) + c.Assert(err, IsNil) + c.Assert(output, Equals, test.output) + } } var indentTests = []struct { - in, out string + in, out string }{ - {"", ""}, - {"\n", "\n"}, - {"a", ">>>a"}, - {"a\n", ">>>a\n"}, - {"a\nb", ">>>a\n>>>b"}, - {" ", ">>> "}, + {"", ""}, + {"\n", "\n"}, + {"a", ">>>a"}, + {"a\n", ">>>a\n"}, + {"a\nb", ">>>a\n>>>b"}, + {" ", ">>> "}, } func (s *PrinterS) TestIndent(c *C) { - for _, test := range indentTests { - out := Indent(test.in, ">>>") - c.Assert(out, Equals, test.out) - } + for _, test := range indentTests { + out := Indent(test.in, ">>>") + c.Assert(out, Equals, test.out) + } } diff --git a/Godeps/_workspace/src/gopkg.in/check.v1/run_test.go b/Godeps/_workspace/src/gopkg.in/check.v1/run_test.go index 3ccb0eed7..f41fffc3f 100644 --- a/Godeps/_workspace/src/gopkg.in/check.v1/run_test.go +++ b/Godeps/_workspace/src/gopkg.in/check.v1/run_test.go @@ -400,7 +400,7 @@ func (s *RunS) TestStreamModeWithMiss(c *C) { // ----------------------------------------------------------------------- // Verify that that the keep work dir request indeed does so. -type WorkDirSuite struct{} +type WorkDirSuite struct {} func (s *WorkDirSuite) Test(c *C) { c.MkDir() @@ -411,7 +411,7 @@ func (s *RunS) TestKeepWorkDir(c *C) { runConf := RunConf{Output: &output, Verbose: true, KeepWorkDir: true} result := Run(&WorkDirSuite{}, &runConf) - c.Assert(result.String(), Matches, ".*\nWORK="+result.WorkDir) + c.Assert(result.String(), Matches, ".*\nWORK=" + result.WorkDir) stat, err := os.Stat(result.WorkDir) c.Assert(err, IsNil) diff --git a/pkg/storage/donut/donut.go b/pkg/storage/donut/donut.go index a22c6def5..2db0e3268 100644 --- a/pkg/storage/donut/donut.go +++ b/pkg/storage/donut/donut.go @@ -26,7 +26,7 @@ func NewDonut(root string) (Donut, *iodine.Error) { for nodeID, node := range nodes { bucketIDs, err := node.GetBuckets() 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 { tokens := strings.Split(bucketID, ":") @@ -38,7 +38,7 @@ func NewDonut(root string) (Donut, *iodine.Error) { driver.buckets[tokens[0]] = bucket } 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}) } } }