From b152fa00145a1b3b811dfb3527a7603e3e0b72c2 Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Fri, 11 Oct 2024 02:24:24 -0500 Subject: [PATCH] fix: Don't import `strings` if case-sensitive --- stringer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stringer.go b/stringer.go index 111212d..2f8d87e 100644 --- a/stringer.go +++ b/stringer.go @@ -121,7 +121,9 @@ func main() { g.Printf("\n") g.Printf("import (\n") g.Printf("\t\"fmt\"\n") - g.Printf("\t\"strings\"\n") + if !*caseSensitive { + g.Printf("\t\"strings\"\n") + } if *sql { g.Printf("\t\"database/sql/driver\"\n") }