mirror of https://github.com/coder/coder.git
chore(scripts/dbgen): only add arg validation for dbfake (#8578)
This commit is contained in:
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 {
|
||||
|
|
Loading…
Reference in New Issue