From b7896919761d1f942a042603510b30921a8c2009 Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Wed, 28 May 2014 10:28:15 -0600 Subject: 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. --- db.go | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'db.go') 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 { -- cgit v1.2.3