aboutsummaryrefslogtreecommitdiff
path: root/db.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-05-28 10:28:15 -0600
committerBen Johnson <benbjohnson@yahoo.com>2014-05-28 10:31:22 -0600
commitb7896919761d1f942a042603510b30921a8c2009 (patch)
treead956b5e92c9e371df3f10277126b6c5821ecd2e /db.go
parentMerge pull request #175 from benbjohnson/check-loop (diff)
downloaddedo-b7896919761d1f942a042603510b30921a8c2009.tar.gz
dedo-b7896919761d1f942a042603510b30921a8c2009.tar.xz
Add streaming check.
This commit changes Tx.Check() to return a channel through which check errors are returned. This allows errors to be found before checking the entire data file.
Diffstat (limited to 'db.go')
-rw-r--r--db.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/db.go b/db.go
index 7b17086..d759b1b 100644
--- a/db.go
+++ b/db.go
@@ -5,7 +5,6 @@ import (
"fmt"
"hash/fnv"
"os"
- "strings"
"sync"
"syscall"
"unsafe"
@@ -632,23 +631,6 @@ func (m *meta) sum64() uint64 {
return h.Sum64()
}
-// ErrorList represents a slice of errors.
-type ErrorList []error
-
-// Error returns a readable count of the errors in the list.
-func (l ErrorList) Error() string {
- return fmt.Sprintf("%d errors occurred", len(l))
-}
-
-// join returns a error messages joined by a string.
-func (l ErrorList) join(sep string) string {
- var a []string
- for _, e := range l {
- a = append(a, e.Error())
- }
- return strings.Join(a, sep)
-}
-
// _assert will panic with a given formatted message if the given condition is false.
func _assert(condition bool, msg string, v ...interface{}) {
if !condition {