Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2fae9b0

Browse files
authored
chore(scripts/dbgen): only add arg validation for dbfake (#8578)
1 parent98164f6 commit2fae9b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎scripts/dbgen/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ func orderAndStubDatabaseFunctions(filePath, receiver, structName string, stub f
220220

221221
for_,fn:=rangefuncs {
222222
varbodyStmts []dst.Stmt
223-
iflen(fn.Func.Params.List)==2&&fn.Func.Params.List[1].Names[0].Name=="arg" {
223+
224+
// Add input validation, only relevant for dbfake.
225+
ifstrings.Contains(filePath,"dbfake")&&len(fn.Func.Params.List)==2&&fn.Func.Params.List[1].Names[0].Name=="arg" {
224226
/*
225227
err := validateDatabaseType(arg)
226228
if err != nil {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp