github.com/profzone/eden-framework@v1.0.10/pkg/sqlx/generator/sql_func_generator_test.go (about) 1 package generator 2 3 import ( 4 "os" 5 "testing" 6 ) 7 8 func TestSqlFuncGenerator(t *testing.T) { 9 cwd, _ := os.Getwd() 10 for _, name := range []string{"User", "Org"} { 11 g := NewSqlFuncGenerator() 12 g.WithComments = true 13 g.WithTableName = true 14 g.WithTableInterfaces = true 15 g.WithMethods = true 16 g.Database = "DBTest" 17 g.StructName = name 18 19 g.Load(cwd) 20 g.Pick() 21 g.Output(cwd) 22 } 23 }