Skip to content

Commit 67e7af3

Browse files
cweillclaude
andcommitted
Remove unnecessary type conversion in generateTest
Resolves #170 The variable `src` is already of type `models.Path`, so the type conversion `models.Path(src)` is redundant. This simplifies the code without changing behavior. Thanks to @fengxuway for the contribution! 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5252e0b commit 67e7af3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gotests.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func generateTest(src models.Path, files []models.Path, opt *Options) (*Generate
111111
}
112112
h := sr.Header
113113
h.Code = nil // Code is only needed from parsed test files.
114-
testPath := models.Path(src).TestPath()
114+
testPath := src.TestPath()
115115
h, tf, err := parseTestFile(p, testPath, h)
116116
if err != nil {
117117
return nil, err

0 commit comments

Comments
 (0)