Remove unused parser resource plumbing
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
package cobra
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -11,7 +9,7 @@ func BenchmarkPerformanceParse(b *testing.B) {
|
||||
wide := performanceFlatTree(128)
|
||||
wideArgs := []string{"wide127"}
|
||||
deep, deepArgs := performanceNestedTree(24)
|
||||
options := ParseOptions{Context: context.Background(), Out: io.Discard, Err: io.Discard}
|
||||
options := ParseOptions{}
|
||||
|
||||
for _, benchmark := range []struct {
|
||||
name string
|
||||
@@ -41,7 +39,7 @@ func BenchmarkPerformanceParse(b *testing.B) {
|
||||
func BenchmarkPerformanceSessionParseAndHelp(b *testing.B) {
|
||||
root := performanceFlatTree(8)
|
||||
args := []string{"wide007"}
|
||||
session := Prepare(root, ParseOptions{Context: context.Background(), Out: io.Discard, Err: io.Discard})
|
||||
session := Prepare(root, ParseOptions{})
|
||||
result := session.Parse(args)
|
||||
if result.Failure != nil {
|
||||
b.Fatalf("fixture parse failed: %s", result.Failure.Message)
|
||||
|
||||
Reference in New Issue
Block a user