mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
chore(scripts/dbgen): only add arg validation for dbfake (#8578)
This commit is contained in:
committed by
GitHub
parent
98164f687e
commit
2fae9b0a69
@ -220,7 +220,9 @@ func orderAndStubDatabaseFunctions(filePath, receiver, structName string, stub f
|
||||
|
||||
for _, fn := range funcs {
|
||||
var bodyStmts []dst.Stmt
|
||||
if len(fn.Func.Params.List) == 2 && fn.Func.Params.List[1].Names[0].Name == "arg" {
|
||||
|
||||
// Add input validation, only relevant for dbfake.
|
||||
if strings.Contains(filePath, "dbfake") && len(fn.Func.Params.List) == 2 && fn.Func.Params.List[1].Names[0].Name == "arg" {
|
||||
/*
|
||||
err := validateDatabaseType(arg)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user