diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-05-28 10:28:15 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-05-28 10:31:22 -0600 |
commit | b7896919761d1f942a042603510b30921a8c2009 (patch) | |
tree | ad956b5e92c9e371df3f10277126b6c5821ecd2e /db.go | |
parent | Merge pull request #175 from benbjohnson/check-loop (diff) | |
download | dedo-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.go | 18 |
1 files changed, 0 insertions, 18 deletions
@@ -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 { |