Skip to content
This repository has been archived by the owner on Mar 9, 2019. It is now read-only.

Commit

Permalink
Fix go vet.
Browse files Browse the repository at this point in the history
  • Loading branch information
benbjohnson committed Jul 27, 2014
1 parent 44e6192 commit bbf2da4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cmd/bolt/bench.go
Expand Up @@ -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)
}
Expand All @@ -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
}
Expand All @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/bolt/export.go
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion node_test.go
Expand Up @@ -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))
Expand Down

0 comments on commit bbf2da4

Please sign in to comment.