From ec8cf7a71e746c407bde9e4f80c72c7c9a5910b3 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Thu, 7 Dec 2023 10:06:48 +0800 Subject: [PATCH] chore: unnecessary use of fmt.Sprintf --- output/mermaid/mermaid_test.go | 7 +++---- output/plantuml/plantuml_test.go | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/output/mermaid/mermaid_test.go b/output/mermaid/mermaid_test.go index aec60e57..751afb08 100644 --- a/output/mermaid/mermaid_test.go +++ b/output/mermaid/mermaid_test.go @@ -2,7 +2,6 @@ package mermaid import ( "bytes" - "fmt" "os" "path/filepath" "testing" @@ -72,7 +71,7 @@ func TestOutputSchemaTemplate(t *testing.T) { if err := o.OutputSchema(got, s); err != nil { t.Error(err) } - f := fmt.Sprintf("mermaid_template_test_schema") + f := "mermaid_template_test_schema" if os.Getenv("UPDATE_GOLDEN") != "" { golden.Update(t, testdataDir(), f, got) return @@ -101,7 +100,7 @@ func TestOutputTable(t *testing.T) { if err := o.OutputTable(got, ta); err != nil { t.Error(err) } - f := fmt.Sprintf("mermaid_test_a") + f := "mermaid_test_a" if os.Getenv("UPDATE_GOLDEN") != "" { golden.Update(t, testdataDir(), f, got) return @@ -133,7 +132,7 @@ func TestOutputTableTemplate(t *testing.T) { if err := o.OutputTable(got, ta); err != nil { t.Error(err) } - f := fmt.Sprintf("mermaid_template_test_a") + f := "mermaid_template_test_a" if os.Getenv("UPDATE_GOLDEN") != "" { golden.Update(t, testdataDir(), f, got) return diff --git a/output/plantuml/plantuml_test.go b/output/plantuml/plantuml_test.go index 524879e5..20159b80 100644 --- a/output/plantuml/plantuml_test.go +++ b/output/plantuml/plantuml_test.go @@ -2,7 +2,6 @@ package plantuml import ( "bytes" - "fmt" "os" "path/filepath" "testing" @@ -73,7 +72,7 @@ func TestOutputSchemaTemplate(t *testing.T) { if err := o.OutputSchema(got, s); err != nil { t.Error(err) } - f := fmt.Sprintf("plantuml_template_test_schema.puml") + f := "plantuml_template_test_schema.puml" if os.Getenv("UPDATE_GOLDEN") != "" { golden.Update(t, testdataDir(), f, got) return @@ -102,7 +101,7 @@ func TestOutputTable(t *testing.T) { if err := o.OutputTable(got, ta); err != nil { t.Error(err) } - f := fmt.Sprintf("plantuml_test_a.puml") + f := "plantuml_test_a.puml" if os.Getenv("UPDATE_GOLDEN") != "" { golden.Update(t, testdataDir(), f, got) return @@ -133,7 +132,7 @@ func TestOutputTableTemplate(t *testing.T) { if err := o.OutputTable(got, ta); err != nil { t.Error(err) } - f := fmt.Sprintf("plantuml_template_test_a.puml") + f := "plantuml_template_test_a.puml" if os.Getenv("UPDATE_GOLDEN") != "" { golden.Update(t, testdataDir(), f, got) return