Skip to content

Commit

Permalink
Merge pull request #544 from testwill/fmt
Browse files Browse the repository at this point in the history
chore: unnecessary use of fmt.Sprintf
  • Loading branch information
k1LoW authored Dec 8, 2023
2 parents ca3af42 + ec8cf7a commit 0b4dbe4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions output/mermaid/mermaid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package mermaid

import (
"bytes"
"fmt"
"os"
"path/filepath"
"testing"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions output/plantuml/plantuml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package plantuml

import (
"bytes"
"fmt"
"os"
"path/filepath"
"testing"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0b4dbe4

Please sign in to comment.