From c3903d38a10fda3c9a366d62705e06ddc558eb2d Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Mon, 5 May 2014 07:56:54 -0600 Subject: Consolidate code for clarity. This commit consolidates some of the smaller files into some of the larger files. The smaller files cluttered the file tree and made it harder to see the logical groupings of structs. --- bolt.go | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) (limited to 'bolt.go') diff --git a/bolt.go b/bolt.go index f456582..c3a1bb5 100644 --- a/bolt.go +++ b/bolt.go @@ -1,29 +1,9 @@ -package bolt - -import ( - "fmt" - "os" -) - -// 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)) -} +// +build !linux -// _assert will panic with a given formatted message if the given condition is false. -func _assert(condition bool, msg string, v ...interface{}) { - if !condition { - panic(fmt.Sprintf("assertion failed: "+msg, v...)) - } -} +package bolt -func warn(v ...interface{}) { - fmt.Fprintln(os.Stderr, v...) -} +import "os" -func warnf(msg string, v ...interface{}) { - fmt.Fprintf(os.Stderr, msg+"\n", v...) +func fdatasync(f *os.File) error { + return f.Sync() } -- cgit v1.2.3