aboutsummaryrefslogtreecommitdiff
path: root/bolt.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-05-05 07:58:53 -0600
committerBen Johnson <benbjohnson@yahoo.com>2014-05-05 07:58:53 -0600
commit6133ecb878b8ae6a7c8c9335c4e6ad2c64090d57 (patch)
tree504e0dcfc35536f7f9023aca59895c653bf68bee /bolt.go
parentMerge pull request #152 from benbjohnson/remove-bolt-set (diff)
parentConsolidate code for clarity. (diff)
downloaddedo-6133ecb878b8ae6a7c8c9335c4e6ad2c64090d57.tar.gz
dedo-6133ecb878b8ae6a7c8c9335c4e6ad2c64090d57.tar.xz
Merge pull request #153 from benbjohnson/consolidate
Consolidate code for clarity.
Diffstat (limited to 'bolt.go')
-rw-r--r--bolt.go30
1 files changed, 5 insertions, 25 deletions
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()
}