mirror of https://github.com/hak5/bolt.git
Fix go vet.
parent
44e6192d2b
commit
bbf2da4c90
|
@ -283,7 +283,7 @@ func benchStartProfiling(options *BenchOptions) {
|
||||||
if options.CPUProfile != "" {
|
if options.CPUProfile != "" {
|
||||||
cpuprofile, err = os.Create(options.CPUProfile)
|
cpuprofile, err = os.Create(options.CPUProfile)
|
||||||
if err != nil {
|
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)
|
pprof.StartCPUProfile(cpuprofile)
|
||||||
}
|
}
|
||||||
|
@ -292,7 +292,7 @@ func benchStartProfiling(options *BenchOptions) {
|
||||||
if options.MemProfile != "" {
|
if options.MemProfile != "" {
|
||||||
memprofile, err = os.Create(options.MemProfile)
|
memprofile, err = os.Create(options.MemProfile)
|
||||||
if err != nil {
|
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
|
runtime.MemProfileRate = 4096
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,7 @@ func benchStartProfiling(options *BenchOptions) {
|
||||||
if options.BlockProfile != "" {
|
if options.BlockProfile != "" {
|
||||||
blockprofile, err = os.Create(options.BlockProfile)
|
blockprofile, err = os.Create(options.BlockProfile)
|
||||||
if err != nil {
|
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)
|
runtime.SetBlockProfileRate(1)
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ func Export(path string) {
|
||||||
// Encode all buckets into JSON.
|
// Encode all buckets into JSON.
|
||||||
output, err := json.Marshal(root)
|
output, err := json.Marshal(root)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("encode: ", err)
|
return fmt.Errorf("encode: %s", err)
|
||||||
}
|
}
|
||||||
print(string(output))
|
print(string(output))
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -54,7 +54,7 @@ func TestNode_read_LeafPage(t *testing.T) {
|
||||||
|
|
||||||
// Check that there are two inodes with correct data.
|
// Check that there are two inodes with correct data.
|
||||||
if !n.isLeaf {
|
if !n.isLeaf {
|
||||||
t.Fatalf("expected leaf", n.isLeaf)
|
t.Fatal("expected leaf")
|
||||||
}
|
}
|
||||||
if len(n.inodes) != 2 {
|
if len(n.inodes) != 2 {
|
||||||
t.Fatalf("exp=2; got=%d", len(n.inodes))
|
t.Fatalf("exp=2; got=%d", len(n.inodes))
|
||||||
|
|
Loading…
Reference in New Issue