mirror of
https://github.com/go-gitea/bolt.git
synced 2026-07-01 20:35:22 -04:00
Fix go vet.
This commit is contained in:
+3
-3
@@ -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)
|
||||
}
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user