Skip to content

Commit b14e524

Browse files
committed
chore: adding todo to refactor main test
1 parent d0e53ef commit b14e524

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/helm-docs/main_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ import (
1717
//
1818
// To run benchmarks, run the command:
1919
//
20-
// go test -run=^$ -bench=. ./cmd/helm-docs
21-
//
20+
// go test -run=^$ -bench=. ./cmd/helm-docs
2221
func BenchmarkHelmDocs(b *testing.B) {
2322
// Copy testdata to a new temporary directory, to keep the working directory clean.
2423
tmp := copyToTempDir(b, os.DirFS(filepath.Join("testdata", "benchmark")))
@@ -89,6 +88,7 @@ func (v *testFlagValue) ValueType() string {
8988
// copyToTempDir copies the specified readonly filesystem into a new temporary directory and returns
9089
// the path to the temporary directory. It fails the benchmark on any error and handles cleanup when
9190
// the benchmark finishes.
91+
// TODO make use of B.TempDir instead of implementing directly https://pkg.go.dev/testing#B.TempDir
9292
func copyToTempDir(b *testing.B, fsys fs.FS) string {
9393
// Create the temporary directory.
9494
tmp, err := os.MkdirTemp("", "")

0 commit comments

Comments
 (0)