aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/bolt/bench.go6
-rw-r--r--cmd/bolt/export.go2
-rw-r--r--node_test.go2
3 files changed, 5 insertions, 5 deletions
diff --git a/cmd/bolt/bench.go b/cmd/bolt/bench.go
index b275542..91af960 100644
--- a/cmd/bolt/bench.go
+++ b/cmd/bolt/bench.go
@@ -283,7 +283,7 @@ func benchStartProfiling(options *BenchOptions) {
if options.CPUProfile != "" {
cpuprofile, err = os.Create(options.CPUProfile)
if err != nil {
- fatal("bench: could not create cpu profile %q: %v", options.CPUProfile, err)
+ fatalf("bench: could not create cpu profile %q: %v", options.CPUProfile, err)
}
pprof.StartCPUProfile(cpuprofile)
}
@@ -292,7 +292,7 @@ func benchStartProfiling(options *BenchOptions) {
if options.MemProfile != "" {
memprofile, err = os.Create(options.MemProfile)
if err != nil {
- fatal("bench: could not create memory profile %q: %v", options.MemProfile, err)
+ fatalf("bench: could not create memory profile %q: %v", options.MemProfile, err)
}
runtime.MemProfileRate = 4096
}
@@ -301,7 +301,7 @@ func benchStartProfiling(options *BenchOptions) {
if options.BlockProfile != "" {
blockprofile, err = os.Create(options.BlockProfile)
if err != nil {
- fatal("bench: could not create block profile %q: %v", options.BlockProfile, err)
+ fatalf("bench: could not create block profile %q: %v", options.BlockProfile, err)
}
runtime.SetBlockProfileRate(1)
}
diff --git a/cmd/bolt/export.go b/cmd/bolt/export.go
index 2689f32..9a0b112 100644
--- a/cmd/bolt/export.go
+++ b/cmd/bolt/export.go
@@ -42,7 +42,7 @@ func Export(path string) {
// Encode all buckets into JSON.
output, err := json.Marshal(root)
if err != nil {
- return fmt.Errorf("encode: ", err)
+ return fmt.Errorf("encode: %s", err)
}
print(string(output))
return nil
diff --git a/node_test.go b/node_test.go
index f4bf4af..fa5d10f 100644
--- a/node_test.go
+++ b/node_test.go
@@ -54,7 +54,7 @@ func TestNode_read_LeafPage(t *testing.T) {
// Check that there are two inodes with correct data.
if !n.isLeaf {
- t.Fatalf("expected leaf", n.isLeaf)
+ t.Fatal("expected leaf")
}
if len(n.inodes) != 2 {
t.Fatalf("exp=2; got=%d", len(n.inodes))